- Jul 06, 2012
-
-
Alexey Samsonov authored
DwarfDebug class could generate the same (inlined) DIVariable twice: 1) when trying to find abstract debug variable for a concrete inlined instance. 2) when explicitly collecting info for variables that were optimized out. This change makes sure that this duplication won't happen and makes Clang pass "gdb.opt/inline-locals" test from gdb testsuite. Reviewed by Eric Christopher. llvm-svn: 159811
-
Jakob Stoklund Olesen authored
llvm-svn: 159800
-
- Jul 05, 2012
-
-
Chandler Carruth authored
vector erase. No functionality changed. llvm-svn: 159746
-
Chandler Carruth authored
hash_value overload for MachineOperands. This addresses a FIXME sufficient for me to remove it, and cleans up the code nicely too. The important changes to the hashing logic: - TargetFlags are now included in all of the hashes. These were complete missed. - Register operands have their subregisters and whether they are a def included in the hash. - We now actually hash all of the operand types. Previously, many operand types were simply *dropped on the floor*. For example: - Floating point immediates - Large integer immediates (>64-bit) - External globals! - Register masks - Metadata operands - It removes the offset from the block-address hash; I'm a bit suspicious of this, but isIdenticalTo doesn't consider the offset for black addresses. Any patterns involving these entities could have triggered extreme slowdowns in MachineCSE or PHIElimination. Let me know if there are PRs you think might be closed now... I'm looking myself, but I may miss them. llvm-svn: 159743
-
Duncan Sands authored
corresponding clang warning. llvm-svn: 159742
-
Chandler Carruth authored
broken. This patch fixes the superficial problems which lead to the intractably slow compile times reported in PR13225. The specific issue is that we were failing to include the *offset* of a global variable in the hash code. Oops. This would in turn cause all MIs which were only distinguishable due to operating on different offsets of a global variable to produce identical hash functions. In some of the test cases attached to the PR I saw hash table activity where there were O(1000) probes-per-lookup *on average*. A very few entries were responsible for most of these probes. There is still quite a bit more to do here. The ad-hoc layering of data in MachineOperands makes them *extremely* brittle to hash correctly. We're missing quite a few other cases, the only ones I've fixed here are the specific MO types which were allowed through the assert() in getOffset(). llvm-svn: 159741
-
Duncan Sands authored
booleans. Patch by James Benton. llvm-svn: 159739
-
Nick Lewycky authored
change. Move the "Not profitable, avoid CSE!" debug message next to where we fail the check for profitability and use a different message for avoiding CSE due to being in different register classes. llvm-svn: 159729
-
Jakob Stoklund Olesen authored
Also allow trailing register mask operands on non-variadic both MachineSDNodes and MachineInstrs. The extra physreg RegisterSDNode operands are added to the MI as <imp-use> operands. This makes it possible to have non-variadic call instructions. Call and return instructions really are non-variadic, the argument registers should only be used implicitly - they are not part of the encoding. llvm-svn: 159727
-
Jakob Stoklund Olesen authored
llvm-svn: 159726
-
- Jul 04, 2012
-
-
Jakob Stoklund Olesen authored
Find the kill as the last terminator to read SrcReg. Patch by Philipp Brüschweiler! llvm-svn: 159722
-
Jakob Stoklund Olesen authored
llvm-svn: 159720
-
Stepan Dyatkovskiy authored
IntegersSubsetMapping - Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement if possible. llvm-svn: 159703
-
Eric Christopher authored
llvm-svn: 159701
-
Matt Beaumont-Gay authored
from IfConversion.cc), and fix some spelling and grammar in the surrounding prose. llvm-svn: 159699
-
Jakob Stoklund Olesen authored
This pass performs if-conversion on SSA form machine code by speculatively executing both sides of the branch and using a cmov instruction to select the result. This can help lower the number of branch mispredictions on architectures like x86 that don't have predicable instructions. The current implementation is very aggressive, and causes regressions on mosts tests. It needs good heuristics that have yet to be implemented. llvm-svn: 159694
-
- Jul 03, 2012
-
-
Stepan Dyatkovskiy authored
IntegersSubsetMapping - Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement if possible. llvm-svn: 159659
-
Eric Christopher authored
This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. llvm-svn: 159618
-
Chandler Carruth authored
It appears to have caught a use-after-free introduced as by r159567 and/or friends which call 'addPass' from many more places. The bug in 'addPass' doesn't appear to be new, and was spotted by inspection when ASan shown a bright light of a stacktrace at these functions. Hopefully this will fix the ASan failure -- I have no test case other than running an ASan-built clang over the test suite. llvm-svn: 159614
-
Evan Cheng authored
llvm-svn: 159611
-
- Jul 02, 2012
-
-
Andrew Trick authored
llvm-svn: 159599
-
Eric Christopher authored
Part of rdar://6880388 and rdar://11766377 llvm-svn: 159590
-
Bob Wilson authored
This is still a work in progress but I believe it is currently good enough to fix PR13122 "Need unit test driver for codegen IR passes". For example, you can run llc with -stop-after=loop-reduce to have it dump out the IR after running LSR. Serializing machine-level IR is not yet supported but we have some patches in progress for that. The plan is to serialize the IR to a YAML file, containing separate sections for the LLVM IR, machine-level IR, and whatever other info is needed. Chad suggested that we stash the stop-after pass in the YAML file and use that instead of the start-after option to figure out where to restart the compilation. I think that's a great idea, but since it's not implemented yet I put the -start-after option into this patch for testing purposes. llvm-svn: 159570
-
Bob Wilson authored
llvm-svn: 159569
-
Bob Wilson authored
This makes it possible to just use a zero value to represent "no pass", so the phony NoPassID global variable is no longer needed. llvm-svn: 159568
-
Bob Wilson authored
This is a preliminary step toward having TargetPassConfig be able to start and stop the compilation at specified passes for unit testing and debugging. No functionality change. llvm-svn: 159567
-
Manman Ren authored
register does not have multiple definitions. Modified TwoAddressInstructionPass to use getUniqueVRegDef instead of getVRegDef. llvm-svn: 159545
-
Andrew Trick authored
Reapplies r159406 with minor cleanup. The regressions appear to have been spurious. llvm-svn: 159541
-
Stepan Dyatkovskiy authored
- Changed isSingleNumber method behaviour. Now this flag is calculated on demand. IntegersSubsetMapping - Optimized diff operation. - Replaced type of Items field from std::list with std::map. - Added new methods: bool isOverlapped(self &RHS) void add(self& RHS, SuccessorClass *S) void detachCase(self& NewMapping, SuccessorClass *Succ) void removeCase(SuccessorClass *Succ) SuccessorClass *findSuccessor(const IntTy& Val) const IntTy* getCaseSingleNumber(SuccessorClass *Succ) IntegersSubsetTest - DiffTest: Added checks for successors. SimplifyCFG Updated SwitchInst usage (now it is case-ragnes compatible) for - SimplifyEqualityComparisonWithOnlyPredecessor - FoldValueComparisonIntoPredecessors llvm-svn: 159527
-
- Jul 01, 2012
-
-
Rafael Espindola authored
implicit_def, the other instruction can be anything, including instructions that define multiple values. Be careful about that and don't assume what operand 0 is. Fixes pr13249. llvm-svn: 159509
-
- Jun 30, 2012
-
-
Rafael Espindola authored
a reduced testcase, but this fixes pr13209. llvm-svn: 159479
-
- Jun 29, 2012
-
-
Manman Ren authored
instructions with two register operands. llvm-svn: 159465
-
Jakob Stoklund Olesen authored
When a local virtual register is made global, make sure to clear any existing kill flags. llvm-svn: 159461
-
Jakob Stoklund Olesen authored
This would previously get reported as the misleading "Virtual register def doesn't dominate all uses." llvm-svn: 159460
-
Manman Ren authored
This comes in handy during peephole optimization. llvm-svn: 159453
-
Alexey Samsonov authored
llvm-svn: 159433
-
Chandler Carruth authored
This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
-
Bill Wendling authored
(a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore instead. llvm-svn: 159414
-
Andrew Trick authored
This reverts commit r159406. I noticed a performance regression so I'll back out for now. llvm-svn: 159411
-
Andrew Trick authored
llvm-svn: 159408
-