Dragon egg not recognizing Target ARM machine

Hello Team,

Good Morning!!

This is Vishnu Prasanth doing my master’s thesis on improving llvm compiler optimization.

Currently I am trying to build dragon egg and when I gave take, it is not getting recognized for ARM machine.

Can you please help me with.

Below are the errors when I gave the below command inside dragon egg directory

GCC=GCC_DIR/gcc LLVM_CONFIG=LLVM_DIR/install/bin/llvm-config make

Compiling Backend.cpp
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp :28:0:
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:34:52: error: “!=” may not appear in macro parameter list
#define DEFAULT_TARGET_AAPCS_BASED(ARM_DEFAULT_ABI != ARM_ABI_APCS &&
^
In file included from /gaia/class/student/seerangv/LLVM_DIR/install/include/llvm /CodeGen/MachinePassRegistry.h:21:0,
from /gaia/class/student/seerangv/LLVM_DIR/install/include/llvm /CodeGen/RegAllocRegistry.h:18,
from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp :35:
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/CodeGen/Passes.h:216: 3: warning: unused parameter ‘C’ [-Wunused-parameter]
createMachineScheduler(MachineSchedContext *C) const {
^
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/CodeGen/Passes.h:223: 3: warning: unused parameter ‘C’ [-Wunused-parameter]
createPostMachineScheduler(MachineSchedContext *C) const {
^
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:28:0:
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp: In function ‘void CreateTargetMachine(const string&)’:
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:254:37: error: no matching function for call to ‘llvm::SubtargetFeatures::AddFeature(const char [5], bool)’
F.AddFeature(“vfp3”, TARGET_VFP3);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:254:37: note: candidate is:
F.AddFeature(“vfp3”, TARGET_VFP3);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:41:0:
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: void llvm::SubtargetFeatures::AddFeature(llvm::StringRef)
void AddFeature(const StringRef String);
^
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: candidate expects 1 argument, 2 provided
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:28:0:
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:256:59: error: no matching function for call to ‘llvm::SubtargetFeatures::AddFeature(const char [5], bool)’
F.AddFeature(“vfp2”, TARGET_VFP && TARGET_HARD_FLOAT);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:256:59: note: candidate is:
F.AddFeature(“vfp2”, TARGET_VFP && TARGET_HARD_FLOAT);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:41:0:
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: void llvm::SubtargetFeatures::AddFeature(llvm::StringRef)
void AddFeature(const StringRef String);
^
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: candidate expects 1 argument, 2 provided
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:28:0:
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:257:37: error: no matching function for call to ‘llvm::SubtargetFeatures::AddFeature(const char [5], bool)’
F.AddFeature(“neon”, TARGET_NEON);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:257:37: note: candidate is:
F.AddFeature(“neon”, TARGET_NEON);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:41:0:
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: void llvm::SubtargetFeatures::AddFeature(llvm::StringRef)
void AddFeature(const StringRef String);
^
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: candidate expects 1 argument, 2 provided
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:28:0:
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:258:37: error: no matching function for call to ‘llvm::SubtargetFeatures::AddFeature(const char [5], bool)’
F.AddFeature(“fp16”, TARGET_FP16);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/include/arm/dragonegg/Target.h:258:37: note: candidate is:
F.AddFeature(“fp16”, TARGET_FP16);
^
/gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:464:3: note: in expansion of macro ‘LLVM_SET_SUBTARGET_FEATURES’
LLVM_SET_SUBTARGET_FEATURES(CPU, Features);
^
In file included from /gaia/class/student/seerangv/DRAGONEGG_DIR/src/Backend.cpp:41:0:
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: void llvm::SubtargetFeatures::AddFeature(llvm::StringRef)
void AddFeature(const StringRef String);
^
/gaia/class/student/seerangv/LLVM_DIR/install/include/llvm/MC/SubtargetFeature.h:81:8: note: candidate expects 1 argument, 2 provided
make: *** [Backend.o] Error 1

Thanks,
Vishnu

You are aware that Dragon Egg is considered dead?

Joerg

Use llvm 3.5.2. It works for x86. May work for ARM.

That’s the problem. LLVM 3.5 is so ancient it may or may not work, and you’ll be on your own either way; because virtually no-one else is using it.

Realistically you should be using Clang for C or C++ code, and probably getting behind one of the thoroughly enjoyably unique Fortran front-ends if that matters to you ($DEITY help you).

Tim.

We have a few inhouse patches for DE which allows the latest llvm to be plugged in. Once again this is an x86 statement. We haven’t experimented with ARM. So the situation is not very bad on the DE front.