#
9fa10658 |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Skip upcast, NFC
llvm-svn: 226514
|
#
c862be86 |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Fix whitespace, NFC
llvm-svn: 226512
|
#
0dcffe2c |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Simplify MapMetadata(), NFC
Take advantage of the new ability of temporary nodes to mutate to distinct and uniqued nodes to greatly simplify the `MapMetadata()` helper functions.
llvm-svn: 2
Utils: Simplify MapMetadata(), NFC
Take advantage of the new ability of temporary nodes to mutate to distinct and uniqued nodes to greatly simplify the `MapMetadata()` helper functions.
llvm-svn: 226511
show more ...
|
#
422e5c7a |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Cleanup whitespace, NFC
llvm-svn: 226507
|
#
7d82313b |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
IR: Return unique_ptr from MDNode::getTemporary()
Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and clean u
IR: Return unique_ptr from MDNode::getTemporary()
Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and clean up call sites. (For now, `DIBuilder` call sites just call `release()` immediately.)
There's an accompanying change in each of clang and polly to use the new API.
llvm-svn: 226504
show more ...
|
#
946fdcc5 |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
IR: Remove MDNodeFwdDecl
Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API changes, there's no real functionality change here. `MDNode::getTemporary()` now forwards to `MDTuple::getTe
IR: Remove MDNodeFwdDecl
Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API changes, there's no real functionality change here. `MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`, which returns a tuple with `isTemporary()` equal to true.
The main point is that we can now add temporaries of other `MDNode` subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the first place because I didn't recognize this need, and thought they were only needed to handle forward references).
A few things left out of (or highlighted by) this commit:
- I've had to remove the (few) uses of `std::unique_ptr<>` to deal with temporaries, since the destructor is no longer public. `getTemporary()` should probably return the equivalent of `std::unique_ptr<T, MDNode::deleteTemporary>`. - `MDLocation::getTemporary()` doesn't exist yet (worse, it actually does exist, but does the wrong thing: `MDNode::getTemporary()` is inherited and returns an `MDTuple`). - `MDNode` now only has one subclass, `UniquableMDNode`, and the distinction between them is actually somewhat confusing.
I'll fix those up next.
llvm-svn: 226501
show more ...
|
#
de03a8b3 |
| 19-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
IR: Add isUniqued() and isTemporary()
Change `MDNode::isDistinct()` to only apply to 'distinct' nodes (not temporaries), and introduce `MDNode::isUniqued()` and `MDNode::isTemporary()` for the other
IR: Add isUniqued() and isTemporary()
Change `MDNode::isDistinct()` to only apply to 'distinct' nodes (not temporaries), and introduce `MDNode::isUniqued()` and `MDNode::isTemporary()` for the other two possibilities.
llvm-svn: 226482
show more ...
|
Revision tags: llvmorg-3.6.0-rc1 |
|
#
e65b0663 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Remove trailing slash from r225924
llvm-svn: 225929
|
#
e54cd9a6 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Remove unreachable break, NFC
llvm-svn: 225924
|
#
a5a0f576 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Handle remapping distinct MDLocations
Part of PR21433.
llvm-svn: 225921
|
#
b84840c0 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Thread distinct-ness through the cloneMD*() functions, NFC
The new logic isn't actually reachable yet, so no functionality change.
llvm-svn: 225918
|
#
7c69c1eb |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Extract cloneMDNode(), NFC
llvm-svn: 225917
|
#
b6515d6a |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Move cloneMD*() up, NFC
llvm-svn: 225915
|
#
47d82981 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Add mapping for uniqued MDLocations
Still doesn't handle distinct ones. Part of PR21433.
llvm-svn: 225914
|
#
4766e012 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Extract cloneMDTuple(), NFC
llvm-svn: 225912
|
#
fb9d128a |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Extract shouldRemapUniquedNode(), NFC
llvm-svn: 225911
|
#
637e7659 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Simplify code, NFC
llvm-svn: 225906
|
#
b557989a |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Extract mapUniquedNode(), NFC
llvm-svn: 225905
|
#
8725ca8c |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: MDNode => UniquableMDNode, NFC
Although this makes the `cast<>` assert more often, the `assert(Node->isResolved())` on the following line would assert in all those cases. So, no functionalit
Utils: MDNode => UniquableMDNode, NFC
Although this makes the `cast<>` assert more often, the `assert(Node->isResolved())` on the following line would assert in all those cases. So, no functionality change here.
llvm-svn: 225903
show more ...
|
#
14cc94c1 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Separate out mapDistinctNode(), NFC
llvm-svn: 225902
|
#
3956a85e |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Use helper function directly, NFC
llvm-svn: 225901
|
#
077affdb |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Extract helper function, NFC
llvm-svn: 225897
|
#
34651ee2 |
| 14-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Use MDTuple::get() directly, NFC
Working towards supporting `MDLocation` in `MapMetadata()`.
llvm-svn: 225896
|
#
118632db |
| 12-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
IR: Split GenericMDNode into MDTuple and UniquableMDNode
Split `GenericMDNode` into two classes (with more descriptive names).
- `UniquableMDNode` will be a common subclass for `MDNode`s that are
IR: Split GenericMDNode into MDTuple and UniquableMDNode
Split `GenericMDNode` into two classes (with more descriptive names).
- `UniquableMDNode` will be a common subclass for `MDNode`s that are sometimes uniqued like constants, and sometimes 'distinct'.
This class gets the (short-lived) RAUW support and related API.
- `MDTuple` is the basic tuple that has always been returned by `MDNode::get()`. This is as opposed to more specific nodes to be added soon, which have additional fields, custom assembly syntax, and extra semantics.
This class gets the hash-related logic, since other sublcasses of `UniquableMDNode` may need to hash based on other fields.
To keep this diff from getting too big, I've added casts to `MDTuple` that won't really scale as new subclasses of `UniquableMDNode` are added, but I'll clean those up incrementally.
(No functionality change intended.)
llvm-svn: 225682
show more ...
|
#
953e1a48 |
| 08-Jan-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Utils: Keep distinct MDNodes distinct in MapMetadata()
Create new copies of distinct `MDNode`s instead of following the uniquing `MDNode` logic.
Just like self-references (or other cycles), `MapMet
Utils: Keep distinct MDNodes distinct in MapMetadata()
Create new copies of distinct `MDNode`s instead of following the uniquing `MDNode` logic.
Just like self-references (or other cycles), `MapMetadata()` creates a new node. In practice most calls use `RF_NoModuleLevelChanges`, in which case nothing is duplicated anyway.
Part of PR22111.
llvm-svn: 225476
show more ...
|