Meador Inge
a9043a2ff6
instcombine: Migrate printf optimizations
...
This patch migrates the printf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 168604
2012-11-26 20:37:20 +00:00
Nadav Rotem
a582cad328
Move the code that uses SCEVs prior to creating the new loops.
...
llvm-svn: 168601
2012-11-26 19:51:46 +00:00
Jakub Staszak
12c307c8fd
Normalize splat 256bit vectors with 8 elements.
...
llvm-svn: 168600
2012-11-26 19:24:31 +00:00
Benjamin Kramer
2cd9913ab9
Decouple MCInstBuilder from the streamer per Eli's request.
...
llvm-svn: 168597
2012-11-26 18:05:52 +00:00
Matt Beaumont-Gay
e6dfb12ddd
Remove stray trailing backslash
...
llvm-svn: 168592
2012-11-26 16:27:22 +00:00
Dmitry Vyukov
ce275012b7
tsan: fix lint warnings
...
llvm-svn: 168590
2012-11-26 14:55:26 +00:00
Eli Bendersky
d85e96be00
Rewrite test to not use a FileCheck variable and redefine it on the same line.
...
In preparation for the FileCheck functionality change which will allow using
a variable later on the same line.
No functionality change.
llvm-svn: 168588
2012-11-26 14:09:46 +00:00
Benjamin Kramer
8f414c9010
Add MCInstBuilder, a utility class to simplify MCInst creation similar to MachineInstrBuilder.
...
Simplify some repetitive code with it. No functionality change.
llvm-svn: 168587
2012-11-26 13:34:22 +00:00
Dmitry Vyukov
2284d1c705
[tsan] add fail order to compare_exchange
...
llvm-svn: 168586
2012-11-26 11:36:19 +00:00
Zhou Sheng
577e452557
Fix a PassManager pointer use-after-free bug.
...
The bug can be triggered when we require LoopInfo analysis ahead of DominatorTree construction in a Module Pass. The cause is that the LoopInfo analysis itself also invokes DominatorTree construction, therefore, when PassManager schedules LoopInfo, it will add DominatorTree first. Then after that, when the PassManger turns to schedule DominatorTree invoked by the above ModulePass, it finds there is already a DominatorTree, so it delete the redundant one. However, somehow it still try to access that pass pointer after free as code pasted below, which results in segment fault.
llvm-svn: 168581
2012-11-26 05:45:53 +00:00
Meador Inge
9d6c54b477
instcombine: Migrate toascii optimizations
...
This patch migrates the toascii optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 168580
2012-11-26 03:38:52 +00:00
Meador Inge
d0fe640156
instcombine: Migrate isascii optimizations
...
This patch migrates the isascii optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 168579
2012-11-26 03:10:07 +00:00
Meador Inge
b385d5577b
instcombine: Migrate isdigit optimizations
...
This patch migrates the isdigit optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 168578
2012-11-26 02:31:59 +00:00
Joe Abbey
61bdb20713
Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
...
Adding CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
This is to handle the wackiness on a Mac host where cmake detects:
CMAKE_CXX_COMPILER == "/usr/bin/c++"
CMAKE_C_COMPILER == "/usr/bin/gcc"
llvm-svn: 168577
2012-11-26 02:02:08 +00:00
Rafael Espindola
07695ce31f
Fix gcc's -Wunused-but-set-variable warnings.
...
llvm-svn: 168576
2012-11-26 00:56:44 +00:00
Meador Inge
69756facb4
Fix bogus comment; no functional change.
...
llvm-svn: 168575
2012-11-26 00:25:33 +00:00
Meador Inge
a7db63a469
instcombine: Migrate *abs optimizations
...
This patch migrates the *abs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 168574
2012-11-26 00:24:07 +00:00
Meador Inge
0a86e4b5ec
instcombine: Migrate ffs* optimizations
...
This patch migrates the ffs* optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 168571
2012-11-25 20:45:27 +00:00
Nadav Rotem
91f709901b
Move the max vector width to a constant parameter. No functionality change.
...
llvm-svn: 168570
2012-11-25 16:48:08 +00:00
Nadav Rotem
d47e1995cd
Fix the document style.
...
llvm-svn: 168569
2012-11-25 16:39:01 +00:00
Nadav Rotem
eee0c236a5
Refactor the ptr runtime check generation code. No functionality change.
...
llvm-svn: 168568
2012-11-25 16:27:16 +00:00
Joe Abbey
87ea4ece75
Code Custodian:
...
- Widespread trailing space removal
- A dash of OCD spacing to block align enums
- joined a line that probably needed 80 cols a while back
llvm-svn: 168566
2012-11-25 15:23:39 +00:00
Rafael Espindola
81ee486113
Add support for .cfi_register now that it is easy to extent the representation
...
to support it. Original patch with the parsing and plumbing by the PaX team and
Roman Divacky. I added the bits in MCDwarf.cpp and the test.
llvm-svn: 168565
2012-11-25 15:14:49 +00:00
Benjamin Kramer
02c4055996
Move semantics are great, don't destroy the optimization opportunity with trivial copy ctors.
...
No functionality change.
llvm-svn: 168561
2012-11-25 11:52:03 +00:00
Nadav Rotem
e0fcf801ff
Rename method. No functionality change.
...
llvm-svn: 168560
2012-11-25 09:13:57 +00:00
Nadav Rotem
fe91aee744
The induction-pointer work is inspired by a research paper. This commit adds a reference.
...
llvm-svn: 168559
2012-11-25 09:09:26 +00:00
Nadav Rotem
c973546f75
Add support for pointer induction variables even when there is no integer induction variable.
...
llvm-svn: 168558
2012-11-25 08:41:35 +00:00
Craig Topper
6efb0bfceb
Refactor to make helper method static.
...
llvm-svn: 168557
2012-11-25 08:08:58 +00:00
Rafael Espindola
9e5a89375e
Further cleanups. Thanks for Sean Silva for noticing it.
...
llvm-svn: 168556
2012-11-25 02:50:32 +00:00
Craig Topper
aecc69f522
Add an extra slash so doxygen comments will be properly recognized.
...
llvm-svn: 168554
2012-11-25 00:59:59 +00:00
Craig Topper
70e0c8dff6
Remove duplicate check of LimitFloatPrecision. It was already checked earlier before IsExp10 could be set to true.
...
llvm-svn: 168553
2012-11-25 00:48:58 +00:00
Craig Topper
a2fa1ce094
Factor common code out of individual if blocks into common tail.
...
llvm-svn: 168551
2012-11-25 00:15:07 +00:00
Craig Topper
4b33debd05
Remove redundant calls to getCurDebugLoc in visitIntrinsicCall. It's already called at the start of the function and captured in a local variable.
...
llvm-svn: 168548
2012-11-24 23:05:23 +00:00
Craig Topper
5a0549a07c
Refactor a bit to make some helper methods static.
...
llvm-svn: 168546
2012-11-24 18:52:06 +00:00
Benjamin Kramer
349eb891a6
libLTO: Add a utility method to initialize the disassemblers.
...
Necessary to give disassembler users (like darwin's otool) a possibility to
dlopen libLTO and still initialize the required LLVM bits. This used to go
through libMCDisassembler but that's a gross layering violation, the MC layer
can't pull in functions from the targets. Adding a function to libLTO is a bit
of a hack but not worse than exposing other disassembler bits from libLTO.
Fixes PR14362.
llvm-svn: 168545
2012-11-24 16:59:10 +00:00
Benjamin Kramer
6ae27fe342
PPC: Reinstate the fatal error when trying to emit a macho file.
...
llvm-svn: 168543
2012-11-24 15:23:49 +00:00
Benjamin Kramer
c1b4b3938f
ARM: Share applyFixup between ELF and Darwin.
...
The implementations already diverged a bit, merge them back together.
llvm-svn: 168542
2012-11-24 14:36:43 +00:00
Benjamin Kramer
42c6896fe3
PPC: MCize most of the darwin PIC emission.
...
The last remaining bit is "bcl 20, 31, AnonSymbol", which I couldn't find the
instruction definition for. Only whitespace changes in assembly output.
llvm-svn: 168541
2012-11-24 13:18:25 +00:00
Benjamin Kramer
2bc0423b5c
PPC: Share applyFixup between ELF and Darwin.
...
llvm-svn: 168540
2012-11-24 13:18:17 +00:00
Benjamin Kramer
3b83fc3c6b
PPC: Simplify code with Twines.
...
No functionality change.
llvm-svn: 168539
2012-11-24 13:18:11 +00:00
Craig Topper
4d7fdccae4
Factor some common code out of individual if blocks.
...
llvm-svn: 168538
2012-11-24 08:22:37 +00:00
Rafael Espindola
6ac5a44d45
Change the representation of MCCFIInstruction.
...
We now store the Register and Offset directly. MachineLocation is gone (from
this file)!
llvm-svn: 168536
2012-11-24 04:33:48 +00:00
Rafael Espindola
0291ef94b9
Give each MCCFIInstruction its own opcode.
...
This untangles the switch cases of the old Move and RelMove opcodes a bit
and makes it clear how to add new instructions.
llvm-svn: 168534
2012-11-24 03:10:54 +00:00
Rafael Espindola
f8d9d5032b
Move a bit of duplicated code into a helper function.
...
llvm-svn: 168533
2012-11-24 02:18:49 +00:00
Rafael Espindola
edc8307796
Refactor how MCCFIInstructions are created.
...
Give MCCFIInstruction a single, private constructor and add helper static
methods that create each type of cfi instruction. This is is preparation
for changing its representation. The representation with a pair
MachineLocations older than MC and has been abused quiet a bit to support
more cfi instructions.
llvm-svn: 168532
2012-11-24 02:01:08 +00:00
Benjamin Kramer
403c120acc
CodeGenPrepare: Move ret duplication out of the instruction iteration loop.
...
It can delete the block, and the loop continues on free'd memory.
No change in output. Found by valgrind.
llvm-svn: 168525
2012-11-23 19:17:06 +00:00
Craig Topper
0308a093e3
Refactor a bit to make some helper functions static.
...
llvm-svn: 168524
2012-11-23 18:38:31 +00:00
Rafael Espindola
0c5276155d
Add a -disable-cfi option to llvm-mc. This is useful for debugging as
...
it will expand any .cfi_* directives in the input assembly.
Unfortunately this cannot replace elf-dump in tests as the asm streamer
cannot relax the line advance opcodes.
llvm-svn: 168522
2012-11-23 17:37:34 +00:00
Rafael Espindola
a6e1d5393f
Implement .cfi_undefined. Based on a patch from PaX team, updated by
...
Roman Divacky. I just added the testcase.
llvm-svn: 168520
2012-11-23 16:59:41 +00:00
Patrik Hägglund
040e5c184c
Disallow the undocumented practice of starting the datalayout string with '-'.
...
Update some test cases accordingly.
llvm-svn: 168516
2012-11-23 14:51:42 +00:00