Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

debug_tree doesn't exist anywhere in llvm or dragonegg. #33

Open
Lucretia opened this issue Oct 3, 2017 · 6 comments
Open

debug_tree doesn't exist anywhere in llvm or dragonegg. #33

Lucretia opened this issue Oct 3, 2017 · 6 comments
Labels

Comments

@Lucretia
Copy link

Lucretia commented Oct 3, 2017

/home/laguest/src/mine/free-ada/tmp/dragonegg/src/Backend.cpp: In function ‘llvm::Value* make_decl_llvm(tree)’:
/home/laguest/src/mine/free-ada/tmp/dragonegg/src/Backend.cpp:1626:20: error: ‘debug_tree’ was not declared in this scope
     debug_tree(decl);
                    ^
In file included from /usr/lib64/llvm/6/include/llvm/Analysis/TargetFolder.h:25:0,
                 from /home/laguest/src/mine/free-ada/tmp/dragonegg/include/dragonegg/Internals.h:34,
                 from /home/laguest/src/mine/free-ada/tmp/dragonegg/include/dragonegg/Debug.h:27,
                 from /home/laguest/src/mine/free-ada/tmp/dragonegg/src/Backend.cpp:26:
/usr/lib64/llvm/6/include/llvm/IR/InstrTypes.h: In instantiation of ‘bool llvm::OperandBundleUser<InstrTy, OpIteratorTy>::isFnAttrDisallowedByOpBundle(llvm::StringRef) const [with InstrTy = llvm::CallInst; OpIteratorTy = llvm::Use*]’:

@xiangzhai
Copy link
Owner

xiangzhai commented Oct 31, 2017

@Lucretia

GCC 4.6

GCC 8.0

And what about your GNU toolchain?

$ gcc -v

@Lucretia
Copy link
Author

Lucretia commented Nov 2, 2017

gcc 6.4.0

@Lucretia
Copy link
Author

Lucretia commented Nov 2, 2017

Ahh my tree.h doesn't have it.

@xiangzhai
Copy link
Owner

Please install dependence at first https://github.com/xiangzhai/dragonegg/wiki/Dependence take my LinuxBox Fedora 25 for an instance:

$ grep debug_tree -r /usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/print-tree.h:extern void debug_tree (tree);
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/tree-into-ssa.h:extern void debug_tree_ssa (void);
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/tree-into-ssa.h:extern void debug_tree_ssa_stats (void);
/usr/lib/gcc/x86_64-redhat-linux/6.4.1/plugin/include/tree-pretty-print.h:extern void debug_tree_chain (tree);

@Lucretia
Copy link
Author

I have the corect files in the right place, but no matter what I do it cannot find them. It keeps trying to the find the system compiler's versions.

@xiangzhai
Copy link
Owner

@Lucretia

#!/bin/bash

echo "Usage: for example ./debug-build /opt/gcc-git/bin/gcc /opt/llvm-svn/bin/llvm-config"

make clean

CC=$1
if [[ -z "$CC" ]]; then
    CC=gcc
fi
$CC --version

LC=$2
if [[ -z "$LC" ]]; then
    LC=llvm-config
fi
$LC --version

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$($LC --libdir)

LANG=en_US.UTF-8 GCC=$CC LLVM_CONFIG=$LC ENABLE_LLVM_PLUGINS=1 DRAGONBALL_DEBUG=1 make -j4 &> /tmp/build.log

Also tested with GNU cross-compiler:

$ ./debug-build /opt/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc /opt/llvm-svn/bin/llvm-config

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants