llvm-project/polly/lib
Duncan P. N. Exon Smith d4c667c9af Avoid unnecessary uses of `MDNode::getTemporary`, NFC
This is a long-delayed follow-up to
5e5b85098d.

`TempMDNode` includes a bunch of machinery for RAUW, and should only be
used when necessary. RAUW wasn't being used in any of these cases... it
was just a placeholder for a self-reference.

Where the real node was using `MDNode::getDistinct`, just replace the
temporary argument with `nullptr`.

Where the real node was using `MDNode::get`, the `replaceOperandWith`
call was "promoting" the node to a distinct one implicitly due to
self-reference detection in `MDNode::handleChangedOperand`. The
`TempMDNode` was serving a purpose by delaying uniquing, but it's way
simpler to just call `MDNode::getDistinct` in the first place.

Note that using a self-reference at all in these places is a hold-over
from before `distinct` metadata existed. It was an old trick to create
distinct nodes. It would be intrusive to change, including bitcode
upgrades, etc., and it's harmless so I'm not sure there's much value in
removing it from existing schemas. After this commit it still has a tiny
memory cost (in the extra metadata operand) but no more overhead in
construction.

Differential Revision: https://reviews.llvm.org/D90079
2020-10-26 17:03:25 -04:00
..
Analysis [Polly] Inline ShoulDelete lambda. NFC. 2020-08-26 13:15:23 -05:00
CodeGen Avoid unnecessary uses of `MDNode::getTemporary`, NFC 2020-10-26 17:03:25 -04:00
Exchange [Polly] Silence mixed signed/unsigned comparison warnings. NFC. 2020-02-10 19:03:08 -06:00
External Remove .svn from exclude list as we moved to git 2020-10-21 16:09:21 +02:00
Plugin Generalize the pass registration mechanism used by Polly to any third-party tool 2020-01-02 16:45:31 +01:00
Support [NewPM] Use PassInstrumentation for -verify-each 2020-10-07 19:24:25 -07:00
Transform [Polly] Delete unused lambda capture after 7175cffb21 2020-10-20 18:34:52 -07:00
CMakeLists.txt [Windows][Polly] Disable LLVMPolly module for all compilers on Windows 2020-09-15 09:12:38 +03:00