1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

80869 Commits

Author SHA1 Message Date
Benjamin Kramer
8a2603ad7e Move APInt::operator! inline, it's small and fuses well with surrounding code when inlined.
llvm-svn: 152688
2012-03-14 00:01:35 +00:00
Evan Cheng
ebe82c24b5 Fortify r152675 a bit. Although I'm not able to come up with a test case that would trigger the truncation case.
llvm-svn: 152678
2012-03-13 22:16:11 +00:00
Evan Cheng
155a7230b7 DAG combine incorrectly optimize (i32 vextract (v4i16 load $addr), c) to
(i16 load $addr+c*sizeof(i16)) and replace uses of (i32 vextract) with the
i16 load. It should issue an extload instead: (i32 extload $addr+c*sizeof(i16)).

rdar://11035895

llvm-svn: 152675
2012-03-13 22:00:52 +00:00
Pete Cooper
df5d2a8893 Target override to allow CodeGenPrepare to sink address operands to intrinsics in the same way it current does for loads and stores
llvm-svn: 152666
2012-03-13 20:59:56 +00:00
Argyrios Kyrtzidis
62c208980d Add a sanity check in MemoryBuffer::getOpenFile() to make sure we don't hang
if the passed in FileSize is inaccurate.

rdar://11034179

llvm-svn: 152662
2012-03-13 20:18:42 +00:00
Benjamin Kramer
88de2712e2 Remove an old hack for pre-2005 MSVC. We don't support ancient microsoft compilers anymore.
llvm-svn: 152659
2012-03-13 20:07:36 +00:00
Bill Wendling
d3389949ad s/SjLjEHPass/SjLjEHPrepare/
No functionality change.

llvm-svn: 152658
2012-03-13 20:04:21 +00:00
Kevin Enderby
b5413ed6cc Change the X86 assembler to not require a segment register on string
instruction's destination operand like it does for the source operand.
Also fix a typo in the comment for X86AsmParser::isSrcOp().

llvm-svn: 152654
2012-03-13 19:47:55 +00:00
Chris Lattner
84f83c2727 enhance jump threading to preserve TBAA information when PRE'ing loads,
fixing rdar://11039258, an issue that came up when inspecting clang's 
bootstrapped codegen.

llvm-svn: 152635
2012-03-13 18:07:41 +00:00
Dan Gohman
fa43b599ac Teach globalopt how to evaluate an invoke with a non-void return type.
llvm-svn: 152634
2012-03-13 18:01:37 +00:00
Duncan Sands
60c339c405 Generalize the "trunc(ptrtoint(x)) - trunc(ptrtoint(y)) ->
trunc(ptrtoint(x-y))" optimization introduced by Chandler.

llvm-svn: 152626
2012-03-13 14:07:05 +00:00
Stepan Dyatkovskiy
55022491ae Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase.
llvm-svn: 152624
2012-03-13 12:37:10 +00:00
Duncan Sands
9931da5d8d Uniformize the InstructionSimplify interface by ensuring that all routines
take a TargetLibraryInfo parameter.  Internally, rather than passing TD, TLI
and DT parameters around all over the place, introduce a struct for holding
them.

llvm-svn: 152623
2012-03-13 11:42:19 +00:00
Eli Bendersky
18a6065211 Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM.
Also refactor the existing OProfile profiling code to reuse the same interfaces with the VTune profiling code.
In addition, unit tests for the profiling interfaces were added.

This patch was prepared by Andrew Kaylor and Daniel Malea, and reviewed in the llvm-commits list by Jim Grosbach

llvm-svn: 152620
2012-03-13 08:33:15 +00:00
Craig Topper
8541c0f470 Remove unused field from FixedLenDecoderEmitter. Move NumberedInstructions declaration from class to run method since its only used there and was being reinitialized anyway.
llvm-svn: 152616
2012-03-13 06:39:00 +00:00
Bill Wendling
c5e906092b Add a return type.
llvm-svn: 152614
2012-03-13 05:52:28 +00:00
Bill Wendling
a77901b3ba Inline the d'tor and add an anchor instead.
llvm-svn: 152613
2012-03-13 05:51:56 +00:00
Bill Wendling
2cbe0fc313 Refactor the SelectionDAG's 'dump' methods into their own .cpp file.
No functionality change.

llvm-svn: 152611
2012-03-13 05:47:27 +00:00
Lang Hames
19d04fbc96 Fixed typo in comment.
llvm-svn: 152610
2012-03-13 05:43:30 +00:00
Eli Friedman
77682009bc Fix regression from r151466: an we can't replace uses of an instruction reachable from the entry block with uses of an instruction not reachable from the entry block. PR12231.
llvm-svn: 152595
2012-03-13 01:06:07 +00:00
Chandler Carruth
ce889fff68 Address some review comments from Duncan. This moves the iterative
offset accumulation to use a boring APInt instead of ConstantExprs.
I didn't go all the way to an 'int64_t' because I wanted APInt to handle
any magic required to properly wrap the arithmetic when the pointer
width is <64 bits. If there is a significant penalty from using APInt
here, first off WTF, and secondly let me know and I'll do the math by
hand.

I've left one layer still operating w/ ConstantExpr because it makes the
interface quite a bit simpler, and that one isn't iterative so has much
lower cost.

I suppose this may potentially speed up some strang compilation
situations, but I don't really expect much. It should have no functional
impact either way.

llvm-svn: 152590
2012-03-13 00:06:15 +00:00
NAKAMURA Takumi
d5f8656288 lit: Pass %INCLUDE% to tests on Win32. clang may expect existence of %INCLUDE% in vcvarsall.bat.
llvm-svn: 152588
2012-03-13 00:02:06 +00:00
Kevin Enderby
8afd951f49 Change the second line of the test added for r152414 to use CHECK-NEXT.
Suggestion by Bill Wendling!

llvm-svn: 152582
2012-03-12 21:38:09 +00:00
Benjamin Kramer
0c62fda38c DFAPacketizerEmitter: Prune includes.
llvm-svn: 152581
2012-03-12 21:32:58 +00:00
Kevin Enderby
9f26c75ab5 Added a missing error check for X86 assembly with mismatched base and index
registers not both being 64-bit or both being 32-bit registers.

llvm-svn: 152580
2012-03-12 21:32:09 +00:00
Benjamin Kramer
a3a97e8220 Inline a trivial helper function.
llvm-svn: 152577
2012-03-12 21:18:53 +00:00
Bill Wendling
864ea9b8af sort by alpha.
llvm-svn: 152576
2012-03-12 21:12:59 +00:00
Eric Christopher
8c012c24d6 Use a posix compliant regexp in export file construction.
Patch by John Spencer

llvm-svn: 152574
2012-03-12 20:58:14 +00:00
Bill Wendling
c2b6b0d28b Revert due to nightly test failures.
--- Reverse-merging r152486 into '.':
U    lib/CodeGen/SjLjEHPrepare.cpp

llvm-svn: 152571
2012-03-12 20:19:41 +00:00
Kostya Serebryany
f5088bb8a5 [asan] move x86-specific test to a separate X86 directory with a custom lit.local.cfg file
llvm-svn: 152567
2012-03-12 18:49:11 +00:00
Chandler Carruth
015ff468c2 When inlining a function and adding its inner call sites to the
candidate set for subsequent inlining, try to simplify the arguments to
the inner call site now that inlining has been performed.

The goal here is to propagate and fold constants through deeply nested
call chains. Without doing this, we loose the inliner bonus that should
be applied because the arguments don't match the exact pattern the cost
estimator uses.

Reviewed on IRC by Benjamin Kramer.

llvm-svn: 152556
2012-03-12 11:19:33 +00:00
Chandler Carruth
d1c1c98162 Teach instsimplify how to constant fold pointer differences.
Typically instcombine has handled this, but pointer differences show up
in several contexts where we would like to get constant folding, and
cannot afford to run instcombine. Specifically, I'm working on improving
the constant folding of arguments used in inline cost analysis with
instsimplify.

Doing this in instsimplify implies some algorithm changes. We have to
handle multiple layers of all-constant GEPs because instsimplify cannot
fold them into a single GEP the way instcombine can. Also, we're only
interested in all-constant GEPs. The result is that this doesn't really
replace the instcombine logic, it's just complimentary and focused on
constant folding.

Reviewed on IRC by Benjamin Kramer.

llvm-svn: 152555
2012-03-12 11:19:31 +00:00
Chandler Carruth
98464723a5 FileCheck-ize this test.
llvm-svn: 152554
2012-03-12 11:19:28 +00:00
Duncan Sands
280a43349c Don't cast away constant qualifier.
llvm-svn: 152553
2012-03-12 10:51:06 +00:00
Bob Wilson
a0d2185fe0 Switch to unified syntax for VFP instructions in inline assembly.
<rdar://problem/11024696>

llvm-svn: 152548
2012-03-12 06:15:36 +00:00
Benjamin Kramer
6c8c4afc05 Replace a hand-coded leading one counting loop with the magic from MathExtras.h.
llvm-svn: 152545
2012-03-11 19:32:35 +00:00
Benjamin Kramer
702df4f3ee Remove global map. This code isn't even hot.
llvm-svn: 152544
2012-03-11 18:12:04 +00:00
Benjamin Kramer
c798b7be6d DwarfDebug: Store the filename/dirname pair as a zero-separated string in a stringmap, instead of using a highly inefficient std::map of a pair of std::strings.
llvm-svn: 152541
2012-03-11 14:56:26 +00:00
Craig Topper
df2bf795d6 Convert more static tables of registers used by calling convention to uint16_t to reduce space.
llvm-svn: 152538
2012-03-11 07:57:25 +00:00
Craig Topper
c83a2b1ac0 Use uint16_t to store registers and opcode in static tables in the target specific backends.
llvm-svn: 152537
2012-03-11 07:16:55 +00:00
Craig Topper
682445688d Remove unused functions getArgRegs and getNumArgRegs.
llvm-svn: 152535
2012-03-11 06:46:40 +00:00
Stepan Dyatkovskiy
72fdcabd4d llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.

llvm-svn: 152532
2012-03-11 06:09:17 +00:00
Gregory Szorc
6d2a379bd6 [llvm.py] Implement disassembler interface
It doesn't currently support the op info and symbol lookup callbacks,
but it is better than nothing.

llvm-svn: 152527
2012-03-11 02:32:56 +00:00
Douglas Gregor
bb5c9263b1 Add a few missing 'template' keywords
llvm-svn: 152525
2012-03-11 02:22:41 +00:00
Craig Topper
3ab8ff7a42 Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables.
llvm-svn: 152524
2012-03-11 01:57:56 +00:00
Michael J. Spencer
c92c10a0a3 Fix warnings when building with VS11.
llvm-svn: 152523
2012-03-11 01:20:23 +00:00
Michael J. Spencer
a979afa64b Fix warnings.
llvm-svn: 152522
2012-03-11 00:51:01 +00:00
Aaron Ballman
c45f292040 Fixing a compile warning triggered in MSVC about constant truncation.
llvm-svn: 152518
2012-03-10 23:03:01 +00:00
Michael J. Spencer
69772efcb2 Make StringRef::getAsInteger work with all integer types. Before this change
it would fail with {,u}int64_t on x86-64 Linux.

This also removes code duplication.

llvm-svn: 152517
2012-03-10 23:02:54 +00:00
Benjamin Kramer
e68be7638b Make helper static, so it can be inlined into its sole caller.
llvm-svn: 152515
2012-03-10 22:41:06 +00:00