summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/blockaddress.ll
Commit message (Collapse)AuthorAgeFilesLines
* verify-uselistorder: Force -preserve-bc-use-list-orderDuncan P. N. Exon Smith2014-08-191-1/+1
| | | | llvm-svn: 216022
* BitcodeReader: Only create one basic block for each blockaddressDuncan P. N. Exon Smith2014-08-161-0/+14
| | | | | | | | | | | | | | | | Block address forward-references are implemented by creating a `BasicBlock` ahead of time that gets inserted in the `Function` when it's eventually encountered. However, if the same blockaddress was used in two separate functions that were parsed *before* the referenced function (and the blockaddress was never used at global scope), two separate basic blocks would get created, one of which would be forgotten creating invalid IR. This commit changes the forward-reference logic to create only one basic block (and always return the same blockaddress). llvm-svn: 215805
* UseListOrder: Fix blockaddress use-list orderDuncan P. N. Exon Smith2014-08-011-0/+1
| | | | | | | | | | | | | | | | | | | `parseBitcodeFile()` uses the generic `getLazyBitcodeFile()` function as a helper. Since `parseBitcodeFile()` isn't actually lazy -- it calls `MaterializeAllPermanently()` -- bypass the unnecessary call to `materializeForwardReferencedFunctions()` by extracting out a common helper function. This removes the last of the use-list churn caused by blockaddresses. This highlights that we can't reproduce use-list order of globals and constants when parsing lazily -- but that's necessarily out of scope. When we're parsing lazily, we never have all the functions in memory, so the use-lists of globals (and constants that reference globals) are always incomplete. This is part of PR5680. llvm-svn: 214581
* BitcodeReader: Correctly insert blockaddress constant referring to a already ↵Benjamin Kramer2012-09-211-0/+15
| | | | | | | | | | | | parsed function. We inserted a placeholder that was never replaced because the function was already visited. Assert that all placeholders have been resolved when tearing down the bitcode reader. Fixes PR13895. llvm-svn: 164369
* It's valid to take the blockaddress of a different function, so remove thisNick Lewycky2011-05-061-0/+30
assert in the bitcode writer. No change needed because the ValueEnumerator holds a whole-module numbering anyhow. Fixes PR9857! llvm-svn: 131016
OpenPOWER on IntegriCloud