cl::desc("Disable frame pointer elimination optimization"),
cl::init(false));
-static cl::opt<bool>
-DisableFPElimNonLeaf("disable-non-leaf-fp-elim",
- cl::desc("Disable frame pointer elimination optimization for non-leaf funcs"),
- cl::init(false));
-
static cl::opt<bool>
EnableUnsafeFPMath("enable-unsafe-fp-math",
cl::desc("Enable optimizations that may decrease FP precision"),
cl::desc("Override default stack alignment"),
cl::init(0));
-static cl::opt<bool>
-EnableRealignStack("realign-stack",
- cl::desc("Realign stack if needed"),
- cl::init(true));
-
static cl::opt<std::string>
TrapFuncName("trap-func", cl::Hidden,
cl::desc("Emit a call to trap function rather than a trap instruction"),
cl::desc("Use .init_array instead of .ctors."),
cl::init(false));
-static cl::opt<unsigned>
-SSPBufferSize("stack-protector-buffer-size", cl::init(8),
- cl::desc("Lower bound for a buffer to be considered for "
- "stack protection"));
-
LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t)
: _module(m), _target(t),
_context(_target->getMCAsmInfo(), _target->getRegisterInfo(), NULL),
LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
size_t size, std::string &errMsg) {
- return makeLTOModule(fd, path, size, size, 0, errMsg);
+ return makeLTOModule(fd, path, size, 0, errMsg);
}
LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
- size_t file_size,
size_t map_size,
off_t offset,
std::string &errMsg) {
OwningPtr<MemoryBuffer> buffer;
- if (error_code ec = MemoryBuffer::getOpenFile(fd, path, buffer, file_size,
- map_size, offset, false)) {
+ if (error_code ec =
+ MemoryBuffer::getOpenFileSlice(fd, path, buffer, map_size, offset)) {
errMsg = ec.message();
return NULL;
}
void LTOModule::getTargetOptions(TargetOptions &Options) {
Options.LessPreciseFPMADOption = EnableFPMAD;
Options.NoFramePointerElim = DisableFPElim;
- Options.NoFramePointerElimNonLeaf = DisableFPElimNonLeaf;
Options.AllowFPOpFusion = FuseFPOps;
Options.UnsafeFPMath = EnableUnsafeFPMath;
Options.NoInfsFPMath = EnableNoInfsFPMath;
Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt;
Options.DisableTailCalls = DisableTailCalls;
Options.StackAlignmentOverride = OverrideStackAlignment;
- Options.RealignStack = EnableRealignStack;
Options.TrapFuncName = TrapFuncName;
Options.PositionIndependentExecutable = EnablePIE;
Options.EnableSegmentedStacks = SegmentedStacks;
Options.UseInitArray = UseInitArray;
- Options.SSPBufferSize = SSPBufferSize;
}
LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
// FIXME: should we handle aliases?
markDefined(*Symbol);
}
- virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) {
+ virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) {
if (Attribute == MCSA_Global)
markGlobal(*Symbol);
+ return true;
}
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
uint64_t Size , unsigned ByteAlignment) {