[PATCH] expose ILP for associative operations in the DAG
Sanjay Patel
spatel at rotateright.com
Thu May 14 12:18:08 PDT 2015
Hi joker.eph, resistor, jroelofs, echristo, qcolombet,
In the aftermath of the reversion of http://reviews.llvm.org/rL236031 (D9232), nobody said this idea was outright crazy...so I'm trying again. :)
This time, I've added a bunch of safety measures:
1. Target-dependent and opt-in per target; currently only x86
2. A map to count and limit the number of times we try this transform
3. Only attempt after type legalization
4. x86 FADD limit artificially low until we're sure there's no fallout
I ended up with target hooks (shouldReassociate / didReassociate) similar to what Jon suggested in a reply mail to r236031.
There are a bunch of TODO items to make this better, but I'm purposely starting as small as possible.
I initially thought that the tracking map should live in X86TargetLowering with the hooks, but that doesn't seem in tune with the rest of the class (it's all const AFAICT), and the target outlives the Combiner or DAG, so the map would need to be reset before each combine if it lived there?
http://reviews.llvm.org/D9780
Files:
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
test/CodeGen/X86/fp-fast.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9780.25794.patch
Type: text/x-patch
Size: 10122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150514/c8ba04fa/attachment.bin>
More information about the llvm-commits
mailing list