mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Normally an 'optnone' function goes through fast-isel, which does not
call DAGCombiner. But we ran into a case (on Windows) where the calling convention causes argument lowering to bail out of fast-isel, and we end up in CodeGenAndEmitDAG() which does run DAGCombiner. So, we need to make DAGCombiner check for 'optnone' after all. Commit includes the test that found this, plus another one that got missed in the original optnone work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1155,6 +1155,13 @@ void DAGCombiner::Run(CombineLevel AtLevel) {
|
||||
LegalOperations = Level >= AfterLegalizeVectorOps;
|
||||
LegalTypes = Level >= AfterLegalizeTypes;
|
||||
|
||||
// Early exit if this basic block is in an optnone function.
|
||||
AttributeSet FnAttrs =
|
||||
DAG.getMachineFunction().getFunction()->getAttributes();
|
||||
if (FnAttrs.hasAttribute(AttributeSet::FunctionIndex,
|
||||
Attribute::OptimizeNone))
|
||||
return;
|
||||
|
||||
// Add all the dag nodes to the worklist.
|
||||
for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
|
||||
E = DAG.allnodes_end(); I != E; ++I)
|
||||
|
Reference in New Issue
Block a user