Kai Nacke via llvm-dev
2016-Feb-27 20:59 UTC
[llvm-dev] Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once!
Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once! Hi all! I am trying to run LDC (LLVM-based D compiler) on AArch64. The compiler contains all IR and target specific passes. You can view it as combined llc/opt tool. It uses the same strategy as opt to collect the passes with the NameParser. Like llc, it calls Target.addPassesToEmitFile() to add the target specific passes. I now get the following error message: ldc2.exe: CommandLine Error: Option 'aarch64-branch-relax' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options Reason is that the option 'aarch64-branch-relax' is registered in file lib/Target/AArch64/AArch64BranchRelaxation.cpp and a second time through PassRegistry::registerPass() (because of the use of the NameParser - the pass is also named 'aarch64-branch-relax'). Is this the intended behavior? If yes, what can I do to fix the compiler? Regards, Kai
Justin Bogner via llvm-dev
2016-Feb-27 21:45 UTC
[llvm-dev] Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once!
Kai Nacke via llvm-dev <llvm-dev at lists.llvm.org> writes:> Compiling for AArch64: CommandLine Error: Option > 'aarch64-branch-relax' registered more than once! > > Hi all! > > I am trying to run LDC (LLVM-based D compiler) on AArch64. The > compiler contains all IR and target specific passes. You can view it > as combined llc/opt tool. It uses the same strategy as opt to collect > the passes with the NameParser. Like llc, it calls > Target.addPassesToEmitFile() to add the target specific passes. > > I now get the following error message: > > ldc2.exe: CommandLine Error: Option 'aarch64-branch-relax' registered > more than once! > LLVM ERROR: inconsistency in registered CommandLine options > > Reason is that the option 'aarch64-branch-relax' is registered in file > lib/Target/AArch64/AArch64BranchRelaxation.cpp and a second time > through PassRegistry::registerPass() (because of the use of the > NameParser - the pass is also named 'aarch64-branch-relax').I wouldn't really recommend using the NameParser outside of a testing tool. The "throw all of the pass names at cl::opt and see what sticks" thing is pretty specialized to opt and makes for a pretty messy command line interface for something that does anything other than just running passes. That said, the aarch64-branch-relax option in AArch64BranchRelaxation is a bit silly: it's only useful for *disabling* the pass, despite the name, and it isn't tested at all. I suspect it's just leftover from when this pass was first being implemented and can be removed. Tim: does it make sense to just remove this flag?> Is this the intended behavior? If yes, what can I do to fix the compiler? > > Regards, > Kai > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Tim Northover via llvm-dev
2016-Feb-28 17:31 UTC
[llvm-dev] Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once!
> Tim: does it make sense to just remove this flag?Might well do (and a bunch of the other parametrization flags in there that look like they might even date from when the ISA was up in the air), but I doubt it would fix the issue. aarch64-branch-relax looks very suspiciously like it would be at the beginning of any alphabetical sort of options. I suspect there's some weird DLL name resolution thing going on and Kai would just hit the next option if it was removed, but don't really know what (particularly on Windows). Cheers. Tim.
Kai Nacke via llvm-dev
2016-Mar-01 17:49 UTC
[llvm-dev] Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once!
On 27.02.2016 22:45, Justin Bogner wrote:> Kai Nacke via llvm-dev <llvm-dev at lists.llvm.org> writes: >> Compiling for AArch64: CommandLine Error: Option >> 'aarch64-branch-relax' registered more than once! >> >> Hi all! >> >> I am trying to run LDC (LLVM-based D compiler) on AArch64. The >> compiler contains all IR and target specific passes. You can view it >> as combined llc/opt tool. It uses the same strategy as opt to collect >> the passes with the NameParser. Like llc, it calls >> Target.addPassesToEmitFile() to add the target specific passes. >> >> I now get the following error message: >> >> ldc2.exe: CommandLine Error: Option 'aarch64-branch-relax' registered >> more than once! >> LLVM ERROR: inconsistency in registered CommandLine options >> >> Reason is that the option 'aarch64-branch-relax' is registered in file >> lib/Target/AArch64/AArch64BranchRelaxation.cpp and a second time >> through PassRegistry::registerPass() (because of the use of the >> NameParser - the pass is also named 'aarch64-branch-relax'). > > I wouldn't really recommend using the NameParser outside of a testing > tool. The "throw all of the pass names at cl::opt and see what sticks" > thing is pretty specialized to opt and makes for a pretty messy command > line interface for something that does anything other than just running > passes. > > That said, the aarch64-branch-relax option in AArch64BranchRelaxation is > a bit silly: it's only useful for *disabling* the pass, despite the > name, and it isn't tested at all. I suspect it's just leftover from when > this pass was first being implemented and can be removed. > > Tim: does it make sense to just remove this flag?Hi Justin! Thanks for the answer! I think I will remove this "feature" from ldc. Looks like asking for more trouble if I keep it... Regards, Kai
Maybe Matching Threads
- Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once!
- Compiling for AArch64: CommandLine Error: Option 'aarch64-branch-relax' registered more than once!
- MSP430 code generation from LLVM IR
- LLVM source compilation Error: CommandLine Error: Option 'mc-relax-all' registered more than once!
- LLVM source compilation Error: CommandLine Error: Option 'mc-relax-all' registered more than once!