This was a local static funtion in SelectionDAG, which I've promoted to
TargetLowering so that I can reuse this to estimate the cost of a memory
operation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/SelectionDAG/TargetLowering.cpp | ||
---|---|---|
165 ↗ | (On Diff #192123) | It's not convenient to pass the DAG, because it's unavailable from TTI where I would like to call and reuse this findOptimalMemOpLowering function. But since the DAG is only used to pass the MachineFunction to getOptimalMemOpType, which only uses it to get the Function, I am going to change findOptimalMemOpLowering and getOptimalMemOpType to take a Function as their last argument. |
Comment Actions
Summarising, these are the patch sets that we need, i.e. the patches that show the whole flow:
Comment Actions
Changed the assert into an early return from function findOptimalMemOpLowering.
We might run into this assert when we actually start using this in D59787.
Comment Actions
In line with your other patch, D59785, can't we just pass AttributeList instead of a Function too?