Displaying 2 results from an estimated 2 matches for "inorder_traversal".
2005 Apr 26
2
[LLVMdev] How to avoid this transformation
...ling any optimization and I am not running either DSA or PoolAlloc. I use the
unoptimized .bc file generated and convert it either to .c or .ll and both formats exhibit this
behavior
Thanks
=======================
struct bintree
{
int data;
struct bintree *Left;
struct bintree *Right;
};
void inorder_traversal(struct bintree *node)
{
if (node->Left != 0) inorder_traversal( node->Left );
printf("%d\t", node->data);
if (node->Right != 0) inorder_traversal( node->Right );
}
struct bintree *make_tree(int level)
{
struct bintree *New = malloc ( sizeof ( struct bintree ) );
New...
2005 Apr 26
0
[LLVMdev] How to avoid this transformation
...ge in that it runs optimizations even when not asked to.
Try this:
llvm-gcc -o tree tree.c -Wa,-disable-inlining -Wl,-disable-inlining
-Chris
> =======================
> struct bintree
> {
> int data;
> struct bintree *Left;
> struct bintree *Right;
> };
>
> void inorder_traversal(struct bintree *node)
> {
> if (node->Left != 0) inorder_traversal( node->Left );
> printf("%d\t", node->data);
> if (node->Right != 0) inorder_traversal( node->Right );
> }
>
> struct bintree *make_tree(int level)
> {
> struct bintree *New...