Use LLVM headers for shared codegen command-line options (#2148)

I.e., llvm/CodeGen/CommandFlags.h which in turn includes
llvm/MC/MCTargetOptionsCommandFlags.h.

This gets rid of a few duplicates on our side and includes about 35
(depending on LLVM version) new command-line options. LLVM provides a
helper function to set up the TargetOptions according to (most of) these
options.
Newer LLVM versions may add new options and we'll automatically inherit
them, including setting up the TargetOptions accordingly.

I did my best (TM) to remove a few unused/undesirable options and hide all
remaining new ones except for `-fp-contract`. The lists will need to be
tweaked from time to time.
This commit is contained in:
kinke 2017-09-20 01:04:43 +02:00 committed by GitHub
parent 0546bd406b
commit ae9d43c167
14 changed files with 261 additions and 201 deletions

View file

@ -460,7 +460,7 @@ void applyTargetMachineAttributes(llvm::Function &func,
// Frame pointer elimination
func.addFnAttr("no-frame-pointer-elim",
opts::disableFpElim ? "true" : "false");
opts::disableFPElim() ? "true" : "false");
}
} // anonymous namespace