mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Change typeIncompatible to return an AttrBuilder instead of new-ing an AttributeSet.
This makes use of the new API which can remove attributes from a set given a builder. This is much faster than creating a temporary set and reduces llc time by about 0.3% which was all spent creating temporary attributes sets on the context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -526,9 +526,9 @@ DataFlowSanitizer::buildWrapperFunction(Function *F, StringRef NewFName,
|
||||
F->getParent());
|
||||
NewF->copyAttributesFrom(F);
|
||||
NewF->removeAttributes(
|
||||
AttributeSet::ReturnIndex,
|
||||
AttributeFuncs::typeIncompatible(NewFT->getReturnType(),
|
||||
AttributeSet::ReturnIndex));
|
||||
AttributeSet::ReturnIndex,
|
||||
AttributeSet::get(F->getContext(), AttributeSet::ReturnIndex,
|
||||
AttributeFuncs::typeIncompatible(NewFT->getReturnType())));
|
||||
|
||||
BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF);
|
||||
if (F->isVarArg()) {
|
||||
@ -703,9 +703,9 @@ bool DataFlowSanitizer::runOnModule(Module &M) {
|
||||
Function *NewF = Function::Create(NewFT, F.getLinkage(), "", &M);
|
||||
NewF->copyAttributesFrom(&F);
|
||||
NewF->removeAttributes(
|
||||
AttributeSet::ReturnIndex,
|
||||
AttributeFuncs::typeIncompatible(NewFT->getReturnType(),
|
||||
AttributeSet::ReturnIndex));
|
||||
AttributeSet::ReturnIndex,
|
||||
AttributeSet::get(NewF->getContext(), AttributeSet::ReturnIndex,
|
||||
AttributeFuncs::typeIncompatible(NewFT->getReturnType())));
|
||||
for (Function::arg_iterator FArg = F.arg_begin(),
|
||||
NewFArg = NewF->arg_begin(),
|
||||
FArgEnd = F.arg_end();
|
||||
@ -1587,8 +1587,7 @@ void DFSanVisitor::visitCallSite(CallSite CS) {
|
||||
NewCS.setCallingConv(CS.getCallingConv());
|
||||
NewCS.setAttributes(CS.getAttributes().removeAttributes(
|
||||
*DFSF.DFS.Ctx, AttributeSet::ReturnIndex,
|
||||
AttributeFuncs::typeIncompatible(NewCS.getInstruction()->getType(),
|
||||
AttributeSet::ReturnIndex)));
|
||||
AttributeFuncs::typeIncompatible(NewCS.getInstruction()->getType())));
|
||||
|
||||
if (Next) {
|
||||
ExtractValueInst *ExVal =
|
||||
|
Reference in New Issue
Block a user