summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [ARM] Enable changing instprinter's behavior based on the per-functionAkira Hatanaka2015-03-274-141/+288
| | | | | | subtarget. llvm-svn: 233451
* clang-format ARMInstPrinter.{h,cpp} before I make changes to these files.Akira Hatanaka2015-03-272-267/+282
| | | | llvm-svn: 233448
* [SCEV] Look at backedge dominating conditions.Sanjoy Das2015-03-272-0/+95
| | | | | | | | | | | | | | | | Summary: This change teaches ScalarEvolution::isLoopBackedgeGuardedByCond to look at edges within the loop body that dominate the latch. We don't do an exhaustive search for all possible edges, but only a quick walk up the dom tree. Reviewers: atrick, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8627 llvm-svn: 233447
* Verifier: Check operands of MDType subclasses and MDCompileUnitDuncan P. N. Exon Smith2015-03-277-154/+278
| | | | | | | | | | | | | | | | | Add verify checks for `MDType` subclasses and for `MDCompileUnit`. These new checks don't yet incorporate everything from `Verify()`, but at least they sanity check the operands. Also downcast accessors as possible. A lot of these accessors can't be downcast as far as we'd like because of arrays of typed objects (stored in a generic `MDTuple`) and `MDString`-based type references. Eventually I'll port over `DIRef<>` and `DITypedArray<>` from `DebugInfo.h` to clean those up as well. Updated bitrotted testcases separately in r233415 and r233443 to reduce churn on the off-chance this needs to be reverted. llvm-svn: 233446
* DebugInfo: Require non-null in DIBuilder::retainType()Duncan P. N. Exon Smith2015-03-271-1/+4
| | | | | | | Assert that a non-null value is being passed in. Note that I fixed the one offender in clang in r233443. llvm-svn: 233445
* Fixing a bug with optimized catch-all handlers in WinEHPrepareAndrew Kaylor2015-03-271-5/+14
| | | | llvm-svn: 233439
* Verifier: Call verifyModule() from llc and optDuncan P. N. Exon Smith2015-03-2718-83/+123
| | | | | | | | | | | | | | | | | | | | | | Change `llc` and `opt` to run `verifyModule()`. This ensures that we check the full module before `FunctionPass::doInitialization()` ever gets called (I was getting crashes in `DwarfDebug` instead of verifier failures when testing a WIP patch that checks operands of compile units). In `opt`, also move up debug-info-stripping so that it still runs before verification. There was a fair bit of broken code that was sitting in tree. Interestingly, some were cases of a `select` that referred to itself in `-instcombine` tests (apparently an intermediate result). I split them off to `*-noverify.ll` tests with RUN lines like this: opt < %s -S -disable-verify -instcombine | opt -S | FileCheck %s This avoids verifying the input file (so we can get the broken code into `-instcombine), but still verifies the output with a second call to `opt` (to verify that `-instcombine` will clean it up like it should). llvm-svn: 233432
* [CMake] Removing duplicates from the list of test suites to generate targets ↵Chris Bieneman2015-03-271-0/+5
| | | | | | | | for. Not doing this causes some headaches for users migrating from autoconf to CMake. llvm-svn: 233428
* fix typo and 80-col; NFCSanjay Patel2015-03-271-2/+2
| | | | llvm-svn: 233427
* Add two small structs for readability in place of std::pair and std::tuple. NFC.Rafael Espindola2015-03-272-14/+39
| | | | llvm-svn: 233422
* Constrain the type of a parameter now that callers without this constraint ↵David Blaikie2015-03-272-5/+3
| | | | | | have been removed. llvm-svn: 233419
* DebugInfo: Fix bad debug info for compile units and typesDuncan P. N. Exon Smith2015-03-2794-102/+102
| | | | | | | | | | | | | | | | Fix debug info in these tests, which started failing with a WIP patch to verify compile units and types. The problems look like they were all caused by bitrot. They fell into these categories: - Using `!{i32 0}` instead of `!{}`. - Using `!{null}` instead of `!{}`. - Using `!MDExpression()` instead of `!{}`. - Using `!8` instead of `!{!8}`. - `file:` references that pointed at `MDCompileUnit`s instead of the same `MDFile` as the compile unit. - `file:` references that were numerically off-by-one or (off-by-ten). llvm-svn: 233415
* [R600/SI] Fix testcase check line.Ahmed Bougacha2015-03-271-1/+1
| | | | | | Missing colon, instruction typo. llvm-svn: 233414
* [AArch64InstPrinter] Use the feature bits of the subtarget passed to the printAkira Hatanaka2015-03-272-6/+14
| | | | | | | | | | | method. This enables the instprinter to print a different system register name based on the feature bits of the per-function subtarget. Differential Revision: http://reviews.llvm.org/D8668 llvm-svn: 233412
* [MCInstPrinter] Enable MCInstPrinter to change its behavior based on theAkira Hatanaka2015-03-2739-108/+229
| | | | | | | | | | | | | | | | | | | | per-function subtarget. Currently, code-gen passes the default or generic subtarget to the constructors of MCInstPrinter subclasses (see LLVMTargetMachine::addPassesToEmitFile), which enables some targets (AArch64, ARM, and X86) to change their instprinter's behavior based on the subtarget feature bits. Since the backend can now use different subtargets for each function, instprinter has to be changed to use the per-function subtarget rather than the default subtarget. This patch takes the first step towards enabling instprinter to change its behavior based on the per-function subtarget. It adds a bit "PassSubtarget" to AsmWriter which tells table-gen to pass a reference to MCSubtargetInfo to the various print methods table-gen auto-generates. I will follow up with changes to instprinters of AArch64, ARM, and X86. llvm-svn: 233411
* [CodeGen] Don't attempt a tail-call with a non-forwarded explicit sret.Ahmed Bougacha2015-03-272-0/+111
| | | | | | | | | | | | Tailcalls are only OK with forwarded sret pointers. With explicit sret, one approximation is to check that the pointer isn't an Instruction, as in that case it might point into some local memory (alloca). That's not OK with tailcalls. Explicit sret counterpart to r233409. Differential Revison: http://reviews.llvm.org/D8510 llvm-svn: 233410
* [CodeGen] Don't attempt a tail-call with implicit sret.Ahmed Bougacha2015-03-272-0/+50
| | | | | | | | | Tailcalls are only OK with forwarded sret pointers. With sret demotion, they're not, as we'd have a pointer into a soon-to-be-dead stack frame. Differential Revison: http://reviews.llvm.org/D8510 llvm-svn: 233409
* Recommit r233116 better: Remove a redundant instcombine involving bitcasts ↵David Blaikie2015-03-271-36/+0
| | | | | | | | | | | | of geps of bitcasts This just didn't need to be here at all, but the assertion I tried to add wasn't appropriate either - the circumstance isn't impossible, it's just not important to deal with it here - the gep-rooted version of this instcombine will handle this case, we don't need to duplicate it for the case where the gep happens to be used in a bitcast. llvm-svn: 233404
* R600/SI: Fix VOP2 VI encodingMarek Olsak2015-03-271-1/+1
| | | | | | Broken by "R600/SI: Refactor VOP2 instruction defs". llvm-svn: 233399
* [asan] Speed up isInterestingAlloca checkAnna Zaks2015-03-271-10/+19
| | | | | | | | | | | | We make many redundant calls to isInterestingAlloca in the AddressSanitzier pass. This is especially inefficient for allocas that have many uses. Let's cache the results to speed up compilation. The compile time improvements depend on the input. I did not see much difference on benchmarks; however, I have a test case where compile time goes from minutes to under a second. llvm-svn: 233397
* [bpf] add support for bpf pseudo instructionAlexei Starovoitov2015-03-274-2/+40
| | | | | | | Expose bpf pseudo load instruction via intrinsic. It is used by front-ends that can encode file descriptors directly into IR instead of relying on relocations. llvm-svn: 233396
* [RegisterCoalescer] Refine the terminal rule to still consider the terminalQuentin Colombet2015-03-272-8/+34
| | | | | | | | | | | | | | | nodes. When a node is terminal it is pushed at the end of the list of the copies to coalesce instead of being completely ignored. In effect, this reduces its priority over non-terminal nodes. Because of that, we do not miss the rematerialization opportunities, nor the copies that can be merged with more complex, than the terminal rule, interference checks. Related to PR22768. llvm-svn: 233395
* LLParser: Require non-null scope for MDLocation and MDLocalVariableDuncan P. N. Exon Smith2015-03-276-6/+20
| | | | | | | | | Change `LLParser` to require a non-null `scope:` field for both `MDLocation` and `MDLocalVariable`. There's no need to wait for the verifier for this check. This also allows their `::getImpl()` methods to assert that the incoming scope is non-null. llvm-svn: 233394
* Remove superfluous .str() and replace std::string concatenation with Twine.Yaron Keren2015-03-2715-20/+20
| | | | llvm-svn: 233392
* Add a -raw option to the -section mode of llvm-objdump.Adrian Prantl2015-03-273-3/+19
| | | | llvm-svn: 233390
* Verifier: Check fields of MDVariable subclassesDuncan P. N. Exon Smith2015-03-2716-107/+205
| | | | | | | | | | | | | | | | Check fields from `MDLocalVariable` and `MDGlobalVariable` and change the accessors to downcast to the right types. `getType()` still returns `Metadata*` since it could be an `MDString`-based reference. Since local variables require non-null scopes, I also updated `LLParser` to require a `scope:` field. A number of testcases had grown bitrot and started failing with this patch; I committed them separately in r233349. If I just broke your out-of-tree testcases, you're probably hitting similar problems (so have a look there). llvm-svn: 233389
* DebugInfo: Fix another bitrotted testcaseDuncan P. N. Exon Smith2015-03-271-2/+2
| | | | | | Fix another case of a missing `scope:` field on an `MDLocalVariable`. llvm-svn: 233388
* [AArch64] Don't store available subtarget features in ↵Vladimir Sukharev2015-03-274-20/+20
| | | | | | | | | | | | | | AArch64SysReg::SysRegMapper Subtarget features must not be a part of the target machine. So, they are now not being stored in SysRegMapper, but provided each time fromString()/toString() are called Reviewers: jmolloy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8655 llvm-svn: 233386
* CMake: enable installing utilsDerek Schuff2015-03-272-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Added a new boolean CMake flag, LLVM_INSTALL_UTILS. When set, the 'install' target will include in the bin directory the utils binaries - e.g. FileCheck. This mirrors the autoconfig behavior. Test Plan: Locally verified that utils binaries are copied when flag is set, and not copied when flag is not set. Reviewers: jfb, dschuff, beanz Reviewed By: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8587 Patch by Mircea Trofin llvm-svn: 233385
* Work around pr23045 and make it easier to reproduce.Rafael Espindola2015-03-274-3/+17
| | | | | | | | | | | Dropping old debug format requires the entire module to be read upfront. This was failing only with the gold plugin, but that is just because llvm-link was not upgrading metadata. The new testcase using llvm-link shows the problem. llvm-svn: 233381
* Close unique sections when switching away from them.Rafael Espindola2015-03-277-9/+17
| | | | | | | It is not possible to switch back to unique secitons, so close them automatically when switching away. llvm-svn: 233380
* Fix subprogram-linkonce-weak.ll and subprogram-linkonce-weak-odr.ll for Windows.Yaron Keren2015-03-272-11/+11
| | | | llvm-svn: 233375
* [Support] Remove statically initialized yet dead code.Benjamin Kramer2015-03-271-18/+0
| | | | | | | | | | | The last user of this code vanished with r223368, but this function still was around being executed on every process start, allocating some memory and then never being used again. No functional change. Also avoids occasional complaints about the benign leak in this function, like PR23037. llvm-svn: 233371
* Reapply r233175 and r233183: float2int.James Molloy2015-03-2710-0/+846
| | | | | | | | 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
* Complete the MachineScheduler fix made way back in r210390.Andrew Trick2015-03-278-25/+25
| | | | | | | | | | | | | | | | | | "Fix the MachineScheduler's logic for updating ready times for in-order. Now the scheduler updates a node's ready time as soon as it is scheduled, before releasing dependent nodes." This fix was only made in one variant of the ScheduleDAGMI driver. Francois de Ferriere reported the issue in the other bit of code where it was also needed. I never got around to coming up with a test case, but it's an obvious fix that shouldn't be delayed any longer. I'll try to refactor this code a little better. I did verify performance on a wide variety of targets and saw no negative impact with this fix. llvm-svn: 233366
* [NFC] Fix typo in comment.Sanjoy Das2015-03-271-1/+1
| | | | llvm-svn: 233365
* [NFC] Fix typo in comment.Sanjoy Das2015-03-271-1/+1
| | | | llvm-svn: 233363
* Code cleanup [NFC]Philip Reames2015-03-271-14/+12
| | | | | | The assertion here was more expensive then it needed to be. We're only inserting allocas in the entry block, so we only need to consider ones in the entry block. llvm-svn: 233362
* More code cleanup [NFC]Philip Reames2015-03-271-14/+7
| | | | llvm-svn: 233361
* More code cleanup [NFC]Philip Reames2015-03-271-12/+13
| | | | | | Minor naming, one potentially unsafe cast llvm-svn: 233359
* Code simplification and style cleanupPhilip Reames2015-03-271-97/+36
| | | | | | All the removed assertions are either implied locally by the assert at the top of the function or properties of the verifier. llvm-svn: 233358
* Require a GC strategy be specified for functions which use gc.statepointPhilip Reames2015-03-2710-45/+47
| | | | | | This was discussed a while back and I left it optional for migration. Since it's been far more than the 'week or two' that was discussed, time to actually make this manditory. llvm-svn: 233357
* Allow explicit spill slots to be specified for a gc.statepointPhilip Reames2015-03-272-4/+141
| | | | | | | | | | This patch adds support for explicitly provided spill slots in the GC arguments of a gc.statepoint. This is somewhat analogous to gcroot, but leverages the STATEPOINT MI node and StackMap infrastructure. The motivation for this is: 1) The stack spilling code for gc.statepoints hasn't advanced as fast as I'd like. One major option is to give up on doing spilling in the backend and do it at the IR level instead. We'd give up the ability to have gc values in registers, but that's a minor cost in practice. We are not neccessarily moving in that direction, but having the ability to prototype such a thing cheaply is interesting. 2) I want to port the gcroot lowering to use the statepoint infastructure. Given the metadata printers for gcroot expect a fixed set of stack roots, it's easiest to just reuse the explicit stack slots and pass them directly to the underlying statepoint. I'm holding off on the documentation for the new feature until I'm reasonable sure this is going to stick around. llvm-svn: 233356
* Reintroduce the SelectionDAG scheduler test for r233351.Andrew Trick2015-03-271-0/+51
| | | | | | | This test returns nonnative integer types which aren't supported on all targets. The real issue with the SelectionDAG scheduler is with x86 EFLAGS. llvm-svn: 233355
* WinEH: Create a parent frame alloca for HandlerType xdata tablesDavid Majnemer2015-03-276-1/+49
| | | | | | | | We don't have any logic to emit those tables yet, so the SDAG lowering of this intrinsic is just a stub. We can see the intrinsic in the prepared IR, though. llvm-svn: 233354
* This test should have been target specific. I missed that.Andrew Trick2015-03-271-51/+0
| | | | llvm-svn: 233353
* Refactor Code inside LoopVectorizer's function isInductionVariable.Karthik Bhat2015-03-272-9/+27
| | | | | | | | This patch exposes LoopVectorizer's isInductionVariable function as common a functionality. http://reviews.llvm.org/D8608 llvm-svn: 233352
* Fix a bug in SelectionDAG scheduling backtracking code: PR22304.Andrew Trick2015-03-272-1/+53
| | | | | | | | | | | | | | | It can happen (by line CurSU->isPending = true; // This SU is not in AvailableQueue right now.) that a SUnit is mark as available but is not in the AvailableQueue. For SUnit being selected for scheduling both conditions must be met. This patch mainly defensively protects from invalid removing a node from a queue. Sometimes nodes are marked isAvailable but are not in the queue because they have been defered due to some hazard. Patch by Pawel Bylica! llvm-svn: 233351
* Revert r233175 and r233183 with it. This pulls float2int back out of the ↵Nick Lewycky2015-03-2710-832/+0
| | | | | | tree, due to PR23038. llvm-svn: 233350
* DebugInfo: Update testcases with invalid variablesDuncan P. N. Exon Smith2015-03-279-20/+23
| | | | | | | | | | | | Fix testcases whose variables are invalid. I'm working on a patch that adds `Verifier` checks for `MDLocalVariable` (and `MDGlobalVariable`), and these failed because: - `scope:` fields need to point at `MDLocalScope` and can't be null. - `file:` fields need to point at `MDFile`. - `inlinedAt:` fields need to point at `MDLocation`. llvm-svn: 233349
OpenPOWER on IntegriCloud