Chandler Carruth [Mon, 2 Jul 2012 13:10:15 +0000 (13:10 +0000)]
Teach the built-in shell test runner in lit to handle '|&'-style pipes.
This is directly cloned from the logic in the TCL test bits of lit.
Hopefully will fix most of the windows build bot fallout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159528
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Mon, 2 Jul 2012 13:02:18 +0000 (13:02 +0000)]
IntRange:
- 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 Jul 2012 12:47:22 +0000 (12:47 +0000)]
Convert all tests using TCL-style quoting to use shell-style quoting.
This was done through the aid of a terrible Perl creation. I will not
paste any of the horrors here. Suffice to say, it require multiple
staged rounds of replacements, state carried between, and a few
nested-construct-parsing hacks that I'm not proud of. It happens, by
luck, to be able to deal with all the TCL-quoting patterns in evidence
in the LLVM test suite.
If anyone is maintaining large out-of-tree test trees, feel free to poke
me and I'll send you the steps I used to convert things, as well as
answer any painful questions etc. IRC works best for this type of thing
I find.
Once converted, switch the LLVM lit config to use ShTests the same as
Clang. In addition to being able to delete large amounts of Python code
from 'lit', this will also simplify the entire test suite and some of
lit's architecture.
Finally, the test suite runs 33% faster on Linux now. ;]
For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159525
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 Jul 2012 12:23:19 +0000 (12:23 +0000)]
Make tests which first provide a negative assertion via 'not', then
a pipeline, and then a positive assertion via grep, use two RUN lines
instead.
Supporting these complex ideas of 'success' and 'failure' across
multiple stages of a pipeline is brittle in the shell world, and would
block switching to ShTest format; it only worked due to contrivances
introduced by the TclTest format.
Writing this as two separate RUN lines seems clearer in any event.
This is another step toward completely removing TclTests from lit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159524
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 Jul 2012 12:20:14 +0000 (12:20 +0000)]
Rewrite three tests that had truly egregious abuses of 'grep' in them to
use FileCheck.
Aside from removing a dependence on TCL-style quoting, this also makes
the tests ... significantly more robust. =] It would be really, *really*
great of the maintainer(s) of the CellSPU backend went through and
systematically rewrite these tests to use FileCheck. There are a lot
more that have nearly this bad of abuses.
Another step along the path to a TclTest-free testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159523
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 2 Jul 2012 11:42:29 +0000 (11:42 +0000)]
[asan] small code simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159522
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 2 Jul 2012 10:18:06 +0000 (10:18 +0000)]
Switch a bunch of Linker tests from using elaborate echo productions to
just provide and reference separate input files from an Inputs
subdirectory. This pattern works very well in the Clang tree and is
easier to understand in my opinion. It also has fewer limitations and
will remove one particularly annoying use of TCL-style {} quoting from
the testsuite.
Also teach the LLVM lit configuration to avoid recursing into 'Inputs'
subdirectories. This wasn't required for the previous 'Inputs'
subdirectories used due to fortuitous suffix patterns.
This is the first step to completely removing support for TCL-style tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159520
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 2 Jul 2012 05:54:45 +0000 (05:54 +0000)]
This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF parser:
1) DIContext is now able to return function name for a given instruction address (besides file/line info).
2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag).
3) test case that checks the basic functionality of llvm-dwarfdump added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159512
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 1 Jul 2012 17:08:01 +0000 (17:08 +0000)]
Now that RegistersDefinedFromSameValue handles one instruction being an
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159509
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 1 Jul 2012 06:12:26 +0000 (06:12 +0000)]
Optimization of shuffle node that can fit to the register form of VBROADCAST instruction on AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159504
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 1 Jul 2012 02:55:34 +0000 (02:55 +0000)]
Reduce code size by using a second switch statement to avoid extra calls to SelectAtomic64. Also catch cases where SelectAtomic64 fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159503
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 1 Jul 2012 02:18:18 +0000 (02:18 +0000)]
Add a break to the end of case statement missed in r159501.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159502
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 1 Jul 2012 02:17:08 +0000 (02:17 +0000)]
Fix a crash on release builds if gather intrinsics are passed a non-constant value for the last argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159501
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 1 Jul 2012 02:05:52 +0000 (02:05 +0000)]
Use a second switch statement to reduce number of calls to SelectGather in code. Reduces code size a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159500
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Jun 2012 22:37:15 +0000 (22:37 +0000)]
Reduce use list thrashing by using DenseMap's find_as for maps with ValueHandle keys.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159497
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 30 Jun 2012 20:21:19 +0000 (20:21 +0000)]
Don't reinsert the 'atexit' function if it already exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159491
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 Jun 2012 10:14:14 +0000 (10:14 +0000)]
Hoist LLVM's lit testsuite infrastructure into module so that it can be
re-used. Also, build in direct support for accumulating a set of lit
parameters, arguments, and testsuites to run as part of a 'check-all'
rule. This sinks 'check-all' from a Clang-specific construct to
a generic construct of the project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159482
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Jun 2012 10:02:08 +0000 (10:02 +0000)]
Avoid sign compare warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159481
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 30 Jun 2012 01:45:55 +0000 (01:45 +0000)]
Handle implicit_defs in the register coalescer. I am still trying to produce
a reduced testcase, but this fixes pr13209.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159479
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 29 Jun 2012 22:10:10 +0000 (22:10 +0000)]
revert r159440. As Duncan pointed out, the test for invoke is not needed at this point
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159471
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 29 Jun 2012 22:06:19 +0000 (22:06 +0000)]
ARM: Clean up optimizeCompare in peephole, no functional change.
Use getUniqueVRegDef.
Replace a loop with existing interfaces: modifiesRegister and readsRegister.
Factor out code into inline functions and simplify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159470
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 29 Jun 2012 21:33:59 +0000 (21:33 +0000)]
Add SrcReg2 to analyzeCompare and optimizeCompareInstr to handle Compare
instructions with two register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159465
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 29 Jun 2012 21:00:03 +0000 (21:00 +0000)]
Clear kill flags in InstrEmitter::EmitSubregNode().
When a local virtual register is made global, make sure to clear any
existing kill flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159461
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 29 Jun 2012 21:00:00 +0000 (21:00 +0000)]
Check for extra kill flags on live-out virtual registers.
This would previously get reported as the misleading "Virtual register
def doesn't dominate all uses."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159460
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 29 Jun 2012 19:58:21 +0000 (19:58 +0000)]
CodeGenPrepare: Don't crash when TLI is not available.
This happens when codegenprepare is invoked via opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159457
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 29 Jun 2012 19:16:05 +0000 (19:16 +0000)]
Add getUniqueVRegDef to MachineRegisterInfo.
This comes in handy during peephole optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159453
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 29 Jun 2012 19:03:05 +0000 (19:03 +0000)]
Rework this to clarify where the removal of nodes from the queue is
really happening. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159451
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 29 Jun 2012 17:49:32 +0000 (17:49 +0000)]
RefreshCallGraph: ignore 'invoke intrinsic'. IntrinsicInst doesnt not recognize invoke, and shouldnt at this point, since the rest of LLVM codebase doesnt expect invoke of intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159441
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 29 Jun 2012 17:37:07 +0000 (17:37 +0000)]
ignore 'invoke new' in isInstructionTriviallyDead, since most callers are not ready to handle invokes. instcombine will take care of this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159440
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 29 Jun 2012 16:04:14 +0000 (16:04 +0000)]
Cleanup in DwarfDebug - fix a typo and remove two unused functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159433
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 29 Jun 2012 13:25:06 +0000 (13:25 +0000)]
Fix a reassociate crash on sozefx when compiling with dragonegg+gcc-4.7 due to
the optimizers producing a multiply expression with more multiplications than
the original (!).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159426
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 29 Jun 2012 12:38:19 +0000 (12:38 +0000)]
Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 29 Jun 2012 09:01:47 +0000 (09:01 +0000)]
Update the CMake files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159417
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 29 Jun 2012 09:00:01 +0000 (09:00 +0000)]
Sphinxify the Atomics documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159416
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 29 Jun 2012 08:32:07 +0000 (08:32 +0000)]
The DIBuilder class is just a wrapper around debug info creation
(a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore
instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159414
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Jun 2012 07:10:41 +0000 (07:10 +0000)]
Revert "Make NumMicroOps a variable in the subtarget's instruction itinerary."
This reverts commit r159406. I noticed a performance regression so I'll back out for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159411
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Jun 2012 04:22:35 +0000 (04:22 +0000)]
In the initial exec mode we always do a load to find the address of a variable.
Before this patch in pic 32 bit code we would add the global base register
and not load from that address. This is a really old bug, but before the
introduction of the tls attributes we would never select initial exec for
pic code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159409
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Jun 2012 03:23:24 +0000 (03:23 +0000)]
misched: avoid scheduling instructions that can't be dispatched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159408
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Jun 2012 03:23:22 +0000 (03:23 +0000)]
misched: count micro-ops toward the issue limit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159407
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Jun 2012 03:23:18 +0000 (03:23 +0000)]
Make NumMicroOps a variable in the subtarget's instruction itinerary.
The TargetInstrInfo::getNumMicroOps API does not change, but soon it
will be used by MachineScheduler. Now each subtarget can specify the
number of micro-ops per itinerary class. For ARM, this is currently
always dynamic (-1), because it is used for load/store multiple which
depends on the number of register operands.
Zero is now a valid number of micro-ops. This can be used for
nop pseudo-instructions or instructions that the hardware can squash
during dispatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159406
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 29 Jun 2012 00:54:20 +0000 (00:54 +0000)]
X86: add more GATHER intrinsics in LLVM
Corrected type for index of llvm.x86.avx2.gather.d.pd.256
from 256-bit to 128-bit.
Corrected types for src|dst|mask of llvm.x86.avx2.gather.q.ps.256
from 256-bit to 128-bit.
Support the following intrinsics:
llvm.x86.avx2.gather.d.q, llvm.x86.avx2.gather.q.q
llvm.x86.avx2.gather.d.q.256, llvm.x86.avx2.gather.q.q.256
llvm.x86.avx2.gather.d.d, llvm.x86.avx2.gather.q.d
llvm.x86.avx2.gather.d.d.256, llvm.x86.avx2.gather.q.d.256
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159402
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 29 Jun 2012 00:45:57 +0000 (00:45 +0000)]
Remove a completely unnecessary mkdir from the CMake build.
Clang has been getting along fine without this for quite some time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159400
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 29 Jun 2012 00:40:15 +0000 (00:40 +0000)]
Add a missing common variable to the lit.site.cfg generation. This was
only used in the Clang tree, but it seems reasonable to support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159399
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 28 Jun 2012 23:44:57 +0000 (23:44 +0000)]
If the step value is a constant zero, the loop isn't going to terminate. Fixes
the assert reported in PR13228!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159393
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 22:57:00 +0000 (22:57 +0000)]
make the verifier accept @llvm.donothing as the only intrinsic that can be invoked
While at it, merge 2 tests and FileCheckize them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159388
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 22:32:27 +0000 (22:32 +0000)]
make simplifyCFG erase invokes to readonly/readnone functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159385
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 22:31:24 +0000 (22:31 +0000)]
make instcombine produce calls to llvm.donothing instead of a random intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159384
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 22:30:12 +0000 (22:30 +0000)]
add a new @llvm.donothing intrinsic that, well, does nothing, and teach CodeGen to ignore calls to it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159383
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 28 Jun 2012 21:03:44 +0000 (21:03 +0000)]
'Promote' vector [su]int_to_fp should widen elements.
Teach vector legalization how to honor Promote for int to float
conversions. The code checking whether to promote the operation knew
to look at the operand, but the actual promotion code didn't. This
fixes that. The operand is promoted up via [zs]ext.
rdar://
11762659
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159378
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 28 Jun 2012 20:46:26 +0000 (20:46 +0000)]
Changed the formatting sequence of a curly brace to
the comment per code review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159376
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 28 Jun 2012 20:35:00 +0000 (20:35 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159374
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 20:17:05 +0000 (20:17 +0000)]
Remove layering violation #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159372
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Jun 2012 20:08:47 +0000 (20:08 +0000)]
Fix hexagon gcc builtin names to use '_' instead of '.'.
This way the generated GCC builtin to LLVM intrinsic converter
actually works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159370
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Jun 2012 19:09:53 +0000 (19:09 +0000)]
Enable automatic GCC<->LLVM intrinsic translation for mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159367
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 28 Jun 2012 18:20:28 +0000 (18:20 +0000)]
Define MIPS DSP Rev1 intrinsics. That allows frontend to emit a correct IR.
This patch was reviewed in the llvm-commits list by Jim Grosbach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159364
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 16:34:03 +0000 (16:34 +0000)]
MemoryBuiltins:
- recognize C++ new(std::nothrow) friends
- ignore ExtractElement and ExtractValue instructions in size/offset analysis (all easy cases are probably folded away before we get here)
- also recognize realloc as noalias
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159356
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 16:13:37 +0000 (16:13 +0000)]
make LazyValueInfo analyze the default case of switch statements (we know that in the default branch the value cannot be any of the switch cases)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159353
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 16:10:13 +0000 (16:10 +0000)]
add ConstantRange::difference (to perform set difference/relative complement)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159352
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Jun 2012 14:25:45 +0000 (14:25 +0000)]
Devirtualize DIScope and subclasses.
Nothing in here makes use of the virtuality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159349
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 28 Jun 2012 09:34:41 +0000 (09:34 +0000)]
[asan] set a hard limit on the number of instructions instrumented pear each BB. This is (hopefully temporary) workaround for PR13225
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159344
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 08:43:12 +0000 (08:43 +0000)]
Sphinxify the bitcode format document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159340
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 28 Jun 2012 07:47:50 +0000 (07:47 +0000)]
Fix Windows build after r159281: s/iterator/const_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159334
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Jun 2012 06:36:24 +0000 (06:36 +0000)]
Move the setup for variables that are expanded in the lit.site.cfg into
a dedicated helper function. This will enable re-using the same logic
for Clang's lit setup, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159333
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Jun 2012 05:42:45 +0000 (05:42 +0000)]
Precompute SCEV pointer analysis prior to instruction fusion in BBVectorize.
When both a load/store and its address computation are being vectorized, it can
happen that the address-computation vectorization destroys SCEV's ability
to analyize the relative pointer offsets. As a result (like with the aliasing
analysis info), we need to precompute the necessary information prior to
instruction fusing.
This was found during stress testing (running through the test suite with a very
low required chain length); unfortunately, I don't have a small test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159332
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Jun 2012 05:42:43 +0000 (05:42 +0000)]
Remove a useless check in BBVectorize.
A shuffle mask will always be a constant, but I did not realize that
when I originally wrote the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159331
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Jun 2012 05:42:42 +0000 (05:42 +0000)]
Allow BBVectorize to form non-2^n-length vectors.
The original algorithm only used recursive pair fusion of equal-length
types. This is now extended to allow pairing of any types that share
the same underlying scalar type. Because we would still generally
prefer the 2^n-length types, those are formed first. Then a second
set of iterations form the non-2^n-length types.
Also, a call to SimplifyInstructionsInBlock has been added after each
pairing iteration. This takes care of DCE (and a few other things)
that make the following iterations execute somewhat faster. For the
same reason, some of the simple shuffle-combination cases are now
handled internally.
There is some additional refactoring work to be done, but I've had
many requests for this feature, so additional refactoring will come
soon in future commits (as will additional test cases).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159330
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Jun 2012 05:42:26 +0000 (05:42 +0000)]
Refactor operation equivalence checking in BBVectorize by extending Instruction::isSameOperationAs.
Maintaining this kind of checking in different places is dangerous, extending
Instruction::isSameOperationAs consolidates this logic into one place. Here
I've added an optional flags parameter and two flags that are important for
vectorization: CompareIgnoringAlignment and CompareUsingScalarTypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159329
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 02:17:58 +0000 (02:17 +0000)]
Only print out the tag if it's there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159328
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 02:12:20 +0000 (02:12 +0000)]
Don't output an empty string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159327
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 28 Jun 2012 01:33:40 +0000 (01:33 +0000)]
The Mips specific inline asm operand modifier 'z' has the
following description in the gnu sources:
Print $0 if operand is zero otherwise print the op normally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159324
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 01:16:18 +0000 (01:16 +0000)]
make LVI::getEdgeValue() always intersect the constraints of the edge with the range of the block. Previously it was only performing the intersection for a few cases, thus losing precision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159320
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 28 Jun 2012 00:59:33 +0000 (00:59 +0000)]
fix a off-by-one bug in intersectWith(), and add a bunch of tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159319
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 00:41:44 +0000 (00:41 +0000)]
Use the interface through DIDescriptor to get the tag/version for a debug info
MDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159317
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Thu, 28 Jun 2012 00:41:11 +0000 (00:41 +0000)]
Silence unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159316
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 00:18:12 +0000 (00:18 +0000)]
Fix cmake failure from moving files around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159314
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Jun 2012 00:16:51 +0000 (00:16 +0000)]
Remove 'site.exp' building from both CMake and configure+make.
This is another vestige of the DejaGNU roots. There were FIXMEs in the
lit setup to add a 'lit.site.cfg', which has been around for quite some
time now, so I've properly switched the handling of the 4 things
actually used in site.exp to go through lit.site.cfg now. No more
parsing of the .exp file, one fewer configure-style generated file,
etc., etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159313
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Jun 2012 00:05:13 +0000 (00:05 +0000)]
Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and
include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h.
The reasoning is because the DebugInfo module is simply an interface to the
debug info MDNodes and has nothing to do with analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159312
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Jun 2012 00:03:15 +0000 (00:03 +0000)]
Remove the last vestiges of the '-lit' and '-dg' test runner split by
removing '-lit' qualifiers from make rules. I've left a legacy
'check-local-lit' rule in case build scripts have this encoded
somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159311
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 Jun 2012 00:03:13 +0000 (00:03 +0000)]
Remove 'check-dg', a wrapper around 'check-local-dg' which was just
nuked.
Add a comment that the 'check-lit' rule is really just a legacy of
having two test runners.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159310
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 27 Jun 2012 23:53:41 +0000 (23:53 +0000)]
Remove autoconf support for runtest and tclsh, some of the last vestigal
bits of DejaGNU.
Eric, you may want to remove the TCLSH bits from aclocal.m4 and
regenerate... I didn't want to touch the m4 file lest something
exploded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159308
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 27 Jun 2012 23:48:39 +0000 (23:48 +0000)]
Rip out legacy DejaGNU support from our Makefiles. This hasn't been the
default in forever, and hasn't even worked since most of the .exp files
were removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159307
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 27 Jun 2012 23:34:25 +0000 (23:34 +0000)]
LLVM-GCC is dead. Really. I promise. ;]
More importantly, these files don't even have the variable that these
lines purport to substite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159304
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 27 Jun 2012 23:13:42 +0000 (23:13 +0000)]
This allows hello world to be compiled for Mips 64 direct object.
It takes advantage of r159299 which introduces relocation support for N64.
elf-dump needed to be upgraded to support N64 relocations as well.
This passes make check.
Jack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159302
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 27 Jun 2012 22:48:25 +0000 (22:48 +0000)]
This allows hello world to be compiled for Mips 64 direct object.
It takes advantage of r159299 which introduces relocation support for N64.
elf-dump needed to be upgraded to support N64 relocations as well.
This passes make check.
Jack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159301
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 27 Jun 2012 22:34:28 +0000 (22:34 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159300
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 27 Jun 2012 22:28:30 +0000 (22:28 +0000)]
The ELF relocation record format is different for N64
which many Mips 64 ABIs use than for O64 which many
if not all other target ABIs use.
Most architectures have the following 64 bit relocation record format:
typedef struct
{
Elf64_Addr r_offset; /* Address of reference */
Elf64_Xword r_info; /* Symbol index and type of relocation */
} Elf64_Rel;
typedef struct
{
Elf64_Addr r_offset;
Elf64_Xword r_info;
Elf64_Sxword r_addend;
} Elf64_Rela;
Whereas N64 has the following format:
typedef struct
{
Elf64_Addr r_offset;/* Address of reference */
Elf64_Word r_sym; /* Symbol index */
Elf64_Byte r_ssym; /* Special symbol */
Elf64_Byte r_type3; /* Relocation type */
Elf64_Byte r_type2; /* Relocation type */
Elf64_Byte r_type; /* Relocation type */
} Elf64_Rel;
typedef struct
{
Elf64_Addr r_offset;/* Address of reference */
Elf64_Word r_sym; /* Symbol index */
Elf64_Byte r_ssym; /* Special symbol */
Elf64_Byte r_type3; /* Relocation type */
Elf64_Byte r_type2; /* Relocation type */
Elf64_Byte r_type; /* Relocation type */
Elf64_Sxword r_addend;
} Elf64_Rela;
The structure is the same size, but the r_info data element
is now 5 separate elements. Besides the content aspects,
endian byte reordering will be different for the area with
each element being endianized separately.
I treat this as generic and continue to pass r_type as
an integer masking and unmasking the byte sized N64
values for N64 mode. I've implemented this and it causes no
affect on other current targets.
This passes make check.
Jack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159299
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Wed, 27 Jun 2012 19:38:29 +0000 (19:38 +0000)]
Refactor and speed up DFA generator.
Patch by Ivan Llopard!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159281
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Wed, 27 Jun 2012 17:10:33 +0000 (17:10 +0000)]
Revert r159136 due to PR13124.
Original commit message:
If a constant or a function has linkonce_odr linkage and unnamed_addr, mark it
hidden. Being linkonce_odr guarantees that it is available in every dso that
needs it. Being a constant/function with unnamed_addr guarantees that the
copies don't have to be merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159272
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 27 Jun 2012 16:23:48 +0000 (16:23 +0000)]
When users ask for -mcpu=help or -mattr=help, just output the help without
requiring a module. Original patch by Sunay Ismail, simplified by Arnaud
de Grandmaison, then complicated by me (if a triple was specified on the
command line, output help for that triple, not for the default).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159268
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 27 Jun 2012 14:19:00 +0000 (14:19 +0000)]
Some reassociate optimizations create new instructions, which they insert just
before the expression root. Any existing operators that are changed to use one
of them needs to be moved between it and the expression root, and recursively
for the operators using that one. When I rewrote RewriteExprTree I accidentally
inverted the logic, resulting in the compacting going down from operators to
operands rather than up from operands to the operators using them, oops. Fix
this, resolving PR12963.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159265
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Wed, 27 Jun 2012 09:48:23 +0000 (09:48 +0000)]
Teach assembler to handle capitalised operation values for DSB instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159259
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 27 Jun 2012 09:44:16 +0000 (09:44 +0000)]
Clean up the 'check' CMake build rule a bit, notable renaming it to
'check-llvm'.
Don't worry! 'check' still works! =] To rationalize the names of targets
used to run tests, the vague plan is the following:
make check-llvm # run LLVM reg/unit tests (currently 'check')
make check-clang # run Clang reg/unit tests (currently 'clang-test')
make check-rt # run CompilerRT reg/unit tests
make check-asan # run ASan reg/unit tests (subset of -rt)
make check-tsan # run TSan reg/unit tests (subset of -rt)
make check-all # run as much of the above as is available
The last one respects what projects are checked out and built for
a given tree. Personally, I would like to eventually make 'check' be an
alias for 'check-all'. For now however, it is an alias for 'check-llvm',
and thus no behavior has changed.
While this patch and my plan only really apply to CMake, I think it
might be good to similarly rationalize the naming scheme for the Make
builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159258
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Wed, 27 Jun 2012 09:36:19 +0000 (09:36 +0000)]
Prevent ARM Assembler crashing on unrecognised assembly format for DSB instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159257
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Jun 2012 07:20:57 +0000 (07:20 +0000)]
Sphinxify the exception handling doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159254
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 27 Jun 2012 00:49:46 +0000 (00:49 +0000)]
Silence uninitialized variable warning in MipsISelDAGToDAG.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159243
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 27 Jun 2012 00:40:34 +0000 (00:40 +0000)]
Test case for r159240.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159242
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 27 Jun 2012 00:30:08 +0000 (00:30 +0000)]
Exclude both libcxx and compiler-rt until we get their CMake builds
suitable for building as a whole-project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159241
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 27 Jun 2012 00:20:39 +0000 (00:20 +0000)]
Fix bug in computation of stack size in MipsFrameLowering.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159240
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 26 Jun 2012 23:22:18 +0000 (23:22 +0000)]
Reduce indentation in function. Rearrange some methods. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159239
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 26 Jun 2012 22:58:01 +0000 (22:58 +0000)]
TableGen: AsmMatcher diagnostics preference detail.
Don't override a custom diagnostic w/ a generic InvalidOperand, all else
being equal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159238
91177308-0d34-0410-b5e6-
96231b3b80d8