- Jan 13, 2014
-
-
Weiming Zhao authored
The issue is caused when Post-RA scheduler reorders a bundle instruction (IT block). However, it only flips the CPSR liveness of the bundle instruction, leaves the instructions inside the bundle unchanged, which causes inconstancy and crashes Thumb2SizeReduction.cpp::ReduceMBB(). llvm-svn: 199127
-
Rafael Espindola authored
llvm-svn: 199126
-
Rafael Espindola authored
llvm-svn: 199125
-
Joerg Sonnenberger authored
llvm-svn: 199124
-
Jordan Rose authored
In an expression like "new (a, b) Foo(x, y)", two things happen: - Memory is allocated by calling a function named 'operator new'. - The memory is initialized using the constructor for 'Foo'. Currently the analyzer only models the second event, though it has special cases for both the default and placement forms of operator new. This patch is the first step towards properly modeling both events: it changes the CFG so that the above expression now generates the following elements. 1. a 2. b 3. (CFGNewAllocator) 4. x 5. y 6. Foo::Foo The analyzer currently ignores the CFGNewAllocator element, but the next step is to treat that as a call like any other. The CFGNewAllocator element is not added to the CFG for analysis-based warnings, since none of them take advantage of it yet. llvm-svn: 199123
-
Marshall Clow authored
llvm-svn: 199122
-
Sergey Matveev authored
llvm-svn: 199121
-
Hans Wennborg authored
The ABI requires the destructor to be invoked in the callee, but the standard does not require access checks here so we avoid doing direct access checks on the destructor. If we end up needing to define an implicit destructor, we don't skip access checks for the base class, etc. Those checks are effectively part of generating the destructor definition, and aren't affected by which TU the check is performed in. Differential Revision: http://llvm-reviews.chandlerc.com/D2409 llvm-svn: 199120
-
Andrea Di Biagio authored
APInt only knows how to compare values with the same BitWidth and asserts in all other cases. With this fix, function PerformORCombine does not use the APInt equality operator if the APInt values returned by 'isConstantSplat' differ in BitWidth. In that case they are different and no comparison is needed. llvm-svn: 199119
-
Joerg Sonnenberger authored
llvm-svn: 199118
-
Richard Sandiford authored
...so that it does something vaguely sensible. llvm-svn: 199117
-
Richard Sandiford authored
llvm-svn: 199116
-
Richard Sandiford authored
The old mask in f24 wasn't well chosen because the lshr would always be zero. CodeGen didn't detect this but InstCombine would. The new mask ensures that both shifts are needed. f26 is specifically testing for a wrap-around mask. The AND can be applied to just the shift left, either before or after the shift. Again, CodeGen kept it in the original form but InstCombine would mask after the shift instead. The exact choice of NILF isn't important for the test so I just dropped it and kept the rotate. llvm-svn: 199115
-
Richard Sandiford authored
...into (ashr (shl (anyext X), ...), ...), which requires one fewer instruction. The (anyext X) can sometimes be simplified too. I didn't do this in DAGCombiner because widening shifts isn't a win on all targets. llvm-svn: 199114
-
Chris Lattner authored
llvm-svn: 199113
-
Kostya Serebryany authored
llvm-svn: 199112
-
Deepak Panickal authored
llvm-svn: 199111
-
Ed Maste authored
As done in other DW_OP_* cases, return an error if the stack is empty rather than eventually crashing elsewhere. Encountered on big-endian MIPS, where LLVM bugs currently result in invalid .debug_loc data. llvm-svn: 199110
-
Tim Northover authored
rdar://problem/15800156 llvm-svn: 199109
-
Tim Northover authored
Previously we only used GPR for the destination placeholder in "ldr rD, [pc, incorrect codegen under the integrated assembler. This should fix both issues (which probably only affect MachO targets at the moment). rdar://problem/15800156 llvm-svn: 199108
-
Daniel Jasper authored
Formatting: Constructor() : // Comment forcing unwanted break. aaaa(aaaa) {} Before: Constructor() : // Comment forcing unwanted break. aaaa(aaaa) {} After: Constructor() : // Comment forcing unwanted break. aaaa(aaaa) {} llvm-svn: 199107
-
David Woodhouse authored
This finishes the job started in r198756, and creates separate opcodes for 64-bit vs. 32-bit versions of the rest of the RET instructions too. LRETL/LRETQ are interesting... I can't see any justification for their existence in the SDM. There should be no 'LRETL' in 64-bit mode, and no need for a REX.W prefix for LRETQ. But this is what GAS does, and my Sandybridge CPU and an Opteron 6376 concur when tested as follows: asm __volatile__("pushq $0x1234\nmovq $0x33,%rax\nsalq $32,%rax\norq $1f,%rax\npushq %rax\nlretl $8\n1:"); asm __volatile__("pushq $1234\npushq $0x33\npushq $1f\nlretq $8\n1:"); asm __volatile__("pushq $0x33\npushq $1f\nlretq\n1:"); asm __volatile__("pushq $0x1234\npushq $0x33\npushq $1f\nlretq $8\n1:"); cf. PR8592 and commit r118903, which added LRETQ. I only added LRETIQ to match it. I don't quite understand how the Intel syntax parsing for ret instructions is working, despite r154468 allegedly fixing it. Aren't the explicitly sized 'retw', 'retd' and 'retq' supposed to work? I have at least made the 'lretq' work with (and indeed *require*) the 'q'. llvm-svn: 199106
-
Daniel Jasper authored
Before: SomeThing // break .SomeFunction( // break param); After: SomeThing // break .SomeFunction( // break param); Seems to be more common in editors and codebases I have looked at. llvm-svn: 199105
-
Chandler Carruth authored
can be used by both the new pass manager and the old. This removes it from any of the virtual mess of the pass interfaces and lets it derive cleanly from the DominatorTreeBase<> template. In turn, tons of boilerplate interface can be nuked and it turns into a very straightforward extension of the base DominatorTree interface. The old analysis pass is now a simple wrapper. The names and style of this split should match the split between CallGraph and CallGraphWrapperPass. All of the users of DominatorTree have been updated to match using many of the same tricks as with CallGraph. The goal is that the common type remains the resulting DominatorTree rather than the pass. This will make subsequent work toward the new pass manager significantly easier. Also in numerous places things became cleaner because I switched from re-running the pass (!!! mid way through some other passes run!!!) to directly recomputing the domtree. llvm-svn: 199104
-
Chandler Carruth authored
This is a precursor to breaking the pass that computes the DominatorTree apart from the concrete DominatorTree. llvm-svn: 199103
-
Elena Demikhovsky authored
Changed intrinsics for vrcp14/vrcp28 vrsqrt14/vrsqrt28 - aligned with GCC. llvm-svn: 199102
-
Chandler Carruth authored
support notionally const queries even though they may trigger DFS numbering updates. The updating of DFS numbers and tracking of slow queries do not mutate the observable state of the domtree. They should be const to differentiate them from the APIs which mutate the tree directly to do incremental updates. This will make it possible in a world where the DominatorTree is not a pass but merely the result of running a pass to derive DominatorTree from the base class as it was originally designed, removing a huge duplication of API in DominatorTree. llvm-svn: 199101
-
Chandler Carruth authored
algorithms and datastructures into the fully generic support library, separating them (almost) entirely from the LLVM IR. This makes the reliance on domtrees here *much* cleaner. It might be worthwhile for someone to use extern templates and other tools to sink a lot more of this code into the .cpp files instead of the .h files, but leaving that for someone other than me. llvm-svn: 199096
-
Chandler Carruth authored
trees into the Support library. These are all expressed in terms of the generic GraphTraits and CFG, with no reliance on any concrete IR types. Putting them in support clarifies that and makes the fact that the static analyzer in Clang uses them much more sane. When moving the Dominators.h file into the IR library I claimed that this was the right home for it but not something I planned to work on. Oops. So why am I doing this? It happens to be one step toward breaking the requirement that IR verification can only be performed from inside of a pass context, which completely blocks the implementation of verification for the new pass manager infrastructure. Fixing it will also allow removing the concept of the "preverify" step (WTF???) and allow the verifier to cleanly flag functions which fail verification in a way that precludes even computing dominance information. Currently, that results in a fatal error even when you ask the verifier to not fatally error. It's awesome like that. The yak shaving will continue... llvm-svn: 199095
-
Alexander Kornienko authored
Summary: Pass check names all the way from ClangTidyModule through ClangTidyCheck and ClangTidyContext to ClangTidyError, and output it in handleErrors. This allows to find mis-behaving check and disable it easily. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2534 llvm-svn: 199094
-
Tim Northover authored
Very sorry, this was a premature patch that I still need to investigate and finish off (for some reason beyond me at the moment it doesn't actually fix the issue in all cases). This reverts commit r199091. llvm-svn: 199093
-
Tim Northover authored
I should have been a politician. llvm-svn: 199092
-
Tim Northover authored
There are two attempted optimisations in reMaterializeTrivialDef, trying to avoid promoting the size of a register too much when rematerializing. Unfortunately, both appear to be flawed. First, we see if the original register would have worked, but this is inadequate. Consider: v1 = SOMETHING (v1 is QQ) v2:Q0 = COPY v1:Q1 (v1, v2 are QQ) ... uses of v2 In this case even though v2 *could* be used directly as the output of SOMETHING, this would set the wrong bits of the QQ register involved. The correct rematerialization must be: v2:Q0_Q1 = SOMETHING (v2 promoted to QQQ) ... uses of v2:Q1_Q2 For the second optimisation, if the correct remat is "v2:idx = SOMETHING" then we can't necessarily expect v2 itself to be valid for SOMETHING, but we do try to hunt for a class between v1 and v2 that works. Unfortunately, this is also wrong: v1 = SOMETHING (v1 is QQ) v2:Q0_Q1 = COPY v1 (v1 is QQ, v2 is QQQ) ... uses of v2 as a QQQ The canonical rematerialization here is "v2:Q0_Q1 = SOMETHING". However current logic would decide that v2 could be a QQ (no interest is taken in later uses). This patch, therefore, always accepts the widened register class without trying to be clever. Generally there is no penalty to this (e.g. in the common GR32 < GR64 case, expanding the width doesn't matter because it's not like you were going to do anything else with the high bits of a GR32 register). It can increase register pressure in cases like the ARM VFP regs though (multiple non-overlapping but equivalent subregisters). Hopefully this situation is rare enough that it won't matter. Unfortunately, no in-tree targets actually expose this as far as I can tell (there are so few isAsCheapAsAMove instructions for it to trigger on) so I've been unable to produce a test. It was exposed in our ARM64 SPEC tests though, and I will be adding a test there that we should be able to contribute soon(TM). llvm-svn: 199091
-
Kostya Serebryany authored
[asan] fix the ppc32 build (by Jakub Jelinek). Note that the LLVM build still builds only for 64-bit PowerPC, and not for 32-bit llvm-svn: 199090
-
Chandler Carruth authored
script. llvm-svn: 199089
-
Chandler Carruth authored
llvm-svn: 199088
-
Chandler Carruth authored
llvm-svn: 199087
-
Chandler Carruth authored
style, and remove some unnecessary comments (the code is perfectly self-documenting here). Also clang-format the function declarations as they wrap cleanly now. llvm-svn: 199084
-
Chandler Carruth authored
IR library in LLVM r199082. llvm-svn: 199083
-
Chandler Carruth authored
directory. These passes are already defined in the IR library, and it doesn't make any sense to have the headers in Analysis. Long term, I think there is going to be a much better way to divide these matters. The dominators code should be fully separated into the abstract graph algorithm and have that put in Support where it becomes obvious that evn Clang's CFGBlock's can use it. Then the verifier can manually construct dominance information from the Support-driven interface while the Analysis library can provide a pass which both caches, reconstructs, and supports a nice update API. But those are very long term, and so I don't want to leave the really confusing structure until that day arrives. llvm-svn: 199082
-