[PATCH] Passing down BinaryOperator flags to BinarySDNode + X86 optimization

Marcello Maggioni hayarms at gmail.com
Sat May 31 19:30:24 PDT 2014


Here an updated patch.

The changes are:

- I stripped away the new getBinaryNode function and integrated the
functionality in the getNode() function with two operands.
- I removed the refactoring for the binary folding logic. Removing
getBinaryNode() makes putting that logic in an external function not
needed. (this also fixes the clang-format problem Owen pointed out).
- Cleaned up some stuff and fixed some style problems.
- Integrated the changes Pete pointed out:
  - Added the flags to the NodeID construction
  - Created a test case for the CSE (not sure it is the best test though
... I'm not an expert testing this kind of stuff)
  - Merged the test for the performance optimization in the optimization
patch.
  - Integrated the code cleanups that were specified.
  - Reduced the test case for the x86 opt.

Now as a result there are only two patches:
  - flag_nodes.patch
  - x86_opt_wrap.patch

I didn't changed BinarySDNode to have classof(), because I think is
probably better doing it separately , but also because it is kind of more
complex than it seems , because it is not clear exactly what are the
opcodes that become BinarySDNodes (a part from the obvious binary ADD, SUB
... etc operations).
It is probably necessary to take more time to collect an accurate list of
all the opcodes that always end up being lowered as BinarySDNodes and add
the classof() then.

Marcello
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140531/97bce95b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flag_nodes.patch
Type: application/octet-stream
Size: 11719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140531/97bce95b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86_opt_wrap.patch
Type: application/octet-stream
Size: 2751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140531/97bce95b/attachment-0001.obj>


More information about the llvm-commits mailing list