- Apr 29, 2015
-
-
David Blaikie authored
[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space Many of the callers already have the pointer type anyway, and for the couple of callers that don't it's pretty easy to call PointerType::get on the pointee type and address space. This avoids LLParser from using PointerType::getElementType when parsing GlobalAliases from IR. llvm-svn: 236160
-
Duncan P. N. Exon Smith authored
Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. llvm-svn: 236120
-
- Apr 23, 2015
-
-
Philip Reames authored
Move isDereferenceablePointer function to Analysis. This function recursively tracks dereferencability over a chain of values like other functions in ValueTracking. This refactoring is motivated by further changes to support dereferenceable_or_null attribute (http://reviews.llvm.org/D8650). isDereferenceablePointer will be extended to perform context-sensitive analysis and IR is not a good place to have such functionality. Patch by: Artur Pilipenko <apilipenko@azulsystems.com> Differential Revision: reviews.llvm.org/D9075 llvm-svn: 235611
-
Karthik Bhat authored
This patch enables interchanging of tightly nested loops with reductions. Differential Revision: http://reviews.llvm.org/D8314 llvm-svn: 235571
-
- Apr 21, 2015
-
-
Duncan P. N. Exon Smith authored
Delete the remaining subclasses of (the already deleted) `DIDescriptor`. Part of PR23080. llvm-svn: 235404
-
Duncan P. N. Exon Smith authored
Delete subclasses of (the already defunct) `DIScope`, updating users to use the raw pointers from the `Metadata` hierarchy directly. llvm-svn: 235356
-
- Apr 18, 2015
-
-
Duncan P. N. Exon Smith authored
Stop using `DIDescriptor` and its subclasses in the `DebugInfoFinder` API, as well as the rest of the API hanging around in `DebugInfo.h`. llvm-svn: 235240
-
- Apr 16, 2015
-
-
Duncan P. N. Exon Smith authored
Continuing gutting `DIDescriptor` subclasses; this edition, `DICompileUnit` and `DIFile`. In the name of PR23080. llvm-svn: 235055
-
- Apr 14, 2015
-
-
Duncan P. N. Exon Smith authored
Change `DICompileUnit::replaceSubprograms()` and `DICompileUnit::replaceGlobalVariables()` to match the `MDCompileUnit` equivalents that they're wrapping. llvm-svn: 234852
-
Duncan P. N. Exon Smith authored
Gut the `DIDescriptor` wrappers around `MDLocalScope` subclasses. Note that `DILexicalBlock` wraps `MDLexicalBlockBase`, not `MDLexicalBlock`. llvm-svn: 234850
-
Duncan P. N. Exon Smith authored
Gut all the non-pointer API from the variable wrappers, except an implicit conversion from `DIGlobalVariable` to `DIDescriptor`. Note that if you're updating out-of-tree code, `DIVariable` wraps `MDLocalVariable` (`MDVariable` is a common base class shared with `MDGlobalVariable`). llvm-svn: 234840
-
- Apr 13, 2015
-
-
Duncan P. N. Exon Smith authored
The only difference between the two is a `dyn_cast<>` to `GlobalVariable`. If optimizations have left anything behind when a global gets replaced, then it doesn't seem like the debug info is dead. I can't seem to find an optimization that would leave behind a non-`GlobalVariable` without nulling the reference entirely, so I haven't added a testcase (but I'll be deleting `getGlobal()` in a future commit). llvm-svn: 234792
-
- Apr 10, 2015
-
-
Benjamin Kramer authored
CallSite roughly behaves as a common base CallInst and InvokeInst. Bring the behavior closer to that model by making upcasts explicit. Downcasts remain implicit and work as before. Following dyn_cast as a mental model checking whether a Value *V isa CallSite now looks like this: if (auto CS = CallSite(V)) // think dyn_cast instead of: if (CallSite CS = V) This is an extra token but I think it is slightly clearer. Making the ctor explicit has the advantage of not accidentally creating nullptr CallSites, e.g. when you pass a Value * to a function taking a CallSite argument. llvm-svn: 234601
-
- Apr 07, 2015
-
-
Duncan P. N. Exon Smith authored
Same as r234255, but for lib/Analysis and lib/Transforms. llvm-svn: 234257
-
- Apr 06, 2015
-
-
David Blaikie authored
llvm-svn: 234224
-
Duncan P. N. Exon Smith authored
Remove `DIDescriptor::Verify()` and the `Verify()`s from subclasses. They had already been gutted, and just did an `isa<>` check. In a couple of cases I've temporarily dropped the check entirely, but subsequent commits are going to disallow conversions to the `DIDescriptor`s directly from `MDNode`, so the checks will come back in another form soon enough. llvm-svn: 234201
-
- Apr 03, 2015
-
-
David Blaikie authored
The plan here is to push the API changes out from the common components (like Constant::getGetElementPtr and IRBuilder::CreateGEP related functions) and just update callers to either pass the type if it's obvious, or pass null. Do this with LoadInst as well and anything else that comes up, then to start porting specific uses to not pass null anymore - this may require some refactoring in each case. llvm-svn: 234042
-
- Apr 02, 2015
-
-
David Blaikie authored
Require the pointee type to be passed explicitly and assert that it is correct. For now it's possible to pass nullptr here (and I've done so in a few places in this patch) but eventually that will be disallowed once all clients have been updated or removed. It'll be a long road to get all the way there... but if you have the cahnce to update your callers to pass the type explicitly without depending on a pointer's element type, that would be a good thing to do soon and a necessary thing to do eventually. llvm-svn: 233938
-
- Mar 30, 2015
-
-
David Blaikie authored
This pushes the use of PointerType::getElementType up into several callers - I'll essentially just have to keep pushing that up the stack until I can eliminate every call to it... llvm-svn: 233604
-
- Mar 27, 2015
-
-
Yaron Keren authored
llvm-svn: 233392
-
James Molloy authored
This re-adds float2int to the tree, after fixing PR23038. It turns out the argument to APSInt() is true-if-unsigned, rather than true-if-signed :(. Added testcase and explanatory comment. llvm-svn: 233370
-
Nick Lewycky authored
llvm-svn: 233350
-
- Mar 25, 2015
-
-
James Molloy authored
Now with a fix for PR23008 and extra regression test. llvm-svn: 233175
-
- Mar 24, 2015
-
-
Hans Wennborg authored
This caused PR23008, compiles failing with: "Use still stuck around after Def is destroyed: %.sroa.speculated" Also reverting follow-up r233064. llvm-svn: 233105
-
James Molloy authored
It is possible to have code that converts from integer to float, performs operations then converts back, and the result is provably the same as if integers were used. This can come from different sources, but the most obvious is a helper function that uses floats but the arguments given at an inlined callsites are integers. This pass considers all integers requiring a bitwidth less than or equal to the bitwidth of the mantissa of a floating point type (23 for floats, 52 for doubles) as exactly representable in floating point. To reduce the risk of harming efficient code, the pass only attempts to perform complete removal of inttofp/fptoint operations, not just move them around. llvm-svn: 233062
-
- Mar 23, 2015
-
-
Benjamin Kramer authored
llvm-svn: 232998
-
- Mar 19, 2015
-
-
Duncan P. N. Exon Smith authored
Remove `DebugInfoVerifierLegacyPass` and the `-verify-di` pass. Instead, call into the `DebugInfoVerifier` from inside `VerifierLegacyPass::finalizeModule()`. This better matches the logic in `verifyModule()` (used by the new PassManager), avoids requiring two separate passes to verify the IR, and makes the API for "add a pass to verify the IR" simple. Note: the `-verify-debug-info` flag still works (for now, at least; eventually it might make sense to just remove it). llvm-svn: 232772
-
Peter Collingbourne authored
Each use of the byte array uses a different alias. This makes the backend less likely to reuse previously computed byte array addresses, improving the security of the CFI mechanism based on this pass. Differential Revision: http://reviews.llvm.org/D8455 llvm-svn: 232770
-
Peter Collingbourne authored
This change also introduces a link-time optimization level of 1. This optimization level runs only the globaldce pass as well as cleanup passes for passes that run at -O0, specifically simplifycfg which cleans up lowerbitsets. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150316/266951.html llvm-svn: 232769
-
Duncan P. N. Exon Smith authored
`StripDebug` was only used by tools/opt/opt.cpp in `AddStandardLinkPasses()`, but opt.cpp adds the same pass based on its command-line flag before it calls `AddStandardLinkPasses()`. Stripping debug info twice isn't very useful. llvm-svn: 232765
-
Peter Collingbourne authored
When we encounter a global with a comdat, rather than iterating over every global in the module to find globals in the same comdat, store the members in a multimap. This effectively lowers the complexity to O(N log N), improving performance significantly for large modules such as might be encountered during LTO. It looks like we used to do something like this until r219191. No functional change. Differential Revision: http://reviews.llvm.org/D8431 llvm-svn: 232743
-
- Mar 17, 2015
-
-
Peter Collingbourne authored
LLVM currently turns these into linker-private symbols, which can be dead stripped by the Darwin linker. llvm-svn: 232435
-
- Mar 14, 2015
-
-
David Blaikie authored
llvm-svn: 232281
-
David Blaikie authored
This involved threading the type-to-gep through a data structure, since the code was relying on the pointer type to carry this information. I imagine there will be a lot of this work across the project... slow work chasing each use case, but the assertions will help keep me honest. llvm-svn: 232277
-
David Blaikie authored
llvm-svn: 232274
-
David Blaikie authored
Adding nullptr to all the IRBuilder stuff because it's the first thing that fails to build when testing without the back-compat functions, so I'll keep having to re-add these locally for each chunk of migration I do. Might as well check them in to save me the churn. Eventually I'll have to migrate these too, but I'm going breadth-first. llvm-svn: 232270
-
David Blaikie authored
I'm just going to migrate these in a pretty ad-hoc & incremental way - providing the backwards compatible API for now, then locally removing it, fixing a few callers, adding it back in and commiting those callers. Rinse, repeat. The assertions should ensure that if I get this wrong we'll find out about it and not just have one giant patch to revert, recommit, revert, recommit, etc. llvm-svn: 232240
-
Peter Collingbourne authored
The linker on that platform may re-order symbols or strip dead symbols, which will break bit set checks. Avoid this by hiding the symbols from the linker. llvm-svn: 232235
-
- Mar 12, 2015
-
-
Kevin Qin authored
It's firstly committed at r231630, and reverted at r231635. Function pass InstructionSimplifier is inserted as barrier to make sure loop unroll pass won't affect on LICM pass. llvm-svn: 232011
-
- Mar 10, 2015
-
-
Michael Zolotukhin authored
llvm-svn: 231820
-