1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
Commit Graph

56905 Commits

Author SHA1 Message Date
Bob Wilson
1a324958d6 Handle AddrMode6 (for NEON load/stores) in Thumb2's rewriteT2FrameIndex.
Radar 7614112.

llvm-svn: 95456
2010-02-06 00:24:38 +00:00
Jakob Stoklund Olesen
7b4c60adae Don't unroll loops containing function calls.
llvm-svn: 95454
2010-02-05 23:21:31 +00:00
Jakob Stoklund Olesen
039cd8ab3a Update CodeMetrics to count 'big' function calls explicitly.
llvm-svn: 95453
2010-02-05 23:21:18 +00:00
Devang Patel
9eb9bb03c9 Do not generate specification DIE for nested functions.
llvm-svn: 95452
2010-02-05 23:09:20 +00:00
Chris Lattner
e1b8c529a4 fix incorrect encoding of SBB8mi that Kevin noticed.
llvm-svn: 95448
2010-02-05 22:56:11 +00:00
Chris Lattner
9d4e878b6a fix a case where we'd mis-encode fisttp because of an incorrect (and
redundant with a correct one) pattern that was added for the disassembler.

llvm-svn: 95446
2010-02-05 22:49:06 +00:00
Chris Lattner
261d9ac280 add note.
llvm-svn: 95445
2010-02-05 22:48:33 +00:00
Chris Lattner
bec530a499 remove fixme
llvm-svn: 95444
2010-02-05 22:46:46 +00:00
Chris Lattner
b79cdb101f print encodings like this:
pslld	69, %mm3                ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0x00,0x00,0x00]

instead of like this:
	pslld	69, %mm3                ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0000,0000,0000]

this only affects 0.

llvm-svn: 95441
2010-02-05 22:20:08 +00:00
Chris Lattner
8db3500688 port X86InstrInfo::determineREX over to the new encoder.
llvm-svn: 95440
2010-02-05 22:10:22 +00:00
Jakob Stoklund Olesen
670458b3be Teach SimplifyCFG about magic pointer constants.
Weird code sometimes uses pointer constants other than null. This patch
teaches SimplifyCFG to build switch instructions in those cases.

Code like this:

void f(const char *x) {
  if (!x)
    puts("null");
  else if ((uintptr_t)x == 1)
    puts("one");
  else if (x == (char*)2 || x == (char*)3)
    puts("two");
  else if ((intptr_t)x == 4)
    puts("four");
  else
    puts(x);
}

Now becomes a switch:

define void @f(i8* %x) nounwind ssp {
entry:
  %magicptr23 = ptrtoint i8* %x to i64            ; <i64> [#uses=1]
  switch i64 %magicptr23, label %if.else16 [
    i64 0, label %if.then
    i64 1, label %if.then2
    i64 2, label %if.then9
    i64 3, label %if.then9
    i64 4, label %if.then14
  ]

Note that LLVM's own DenseMap uses magic pointers.

llvm-svn: 95439
2010-02-05 22:03:18 +00:00
Chris Lattner
15817c2239 wire up 64-bit MCCodeEmitter.
llvm-svn: 95438
2010-02-05 21:51:35 +00:00
Chris Lattner
22151cbec5 really kill off the last MRMInitReg inst, remove logic from encoder.
llvm-svn: 95437
2010-02-05 21:34:18 +00:00
Chris Lattner
071fe62af6 lower the last of the MRMInitReg instructions in MCInstLower.
llvm-svn: 95435
2010-02-05 21:30:49 +00:00
Chris Lattner
9b3cf069dc teach X86MCInstLower to lower the MOV32r0 and MOV8r0
pseudo instructions.

llvm-svn: 95433
2010-02-05 21:21:06 +00:00
Chris Lattner
f77eadcfbb genericize helpers, use them for MOV16r0/MOV64r0
llvm-svn: 95432
2010-02-05 21:15:57 +00:00
Chris Lattner
32f09202d6 factor code better in X86MCInstLower::Lower, teach it to
lower the SETB* instructions.

llvm-svn: 95431
2010-02-05 21:13:48 +00:00
Chris Lattner
44965f1107 fix logical-select to invoke filecheck right, and fix hte instcombine
xform it is checking to actually pass.  There is no need to match
m_SelectCst<0, -1> since instcombine canonicalizes that into not(sext).

Add matches for sext(not(x)) in addition to not(sext(x)).

llvm-svn: 95420
2010-02-05 19:53:02 +00:00
Chris Lattner
3590276566 implement the rest of the encoding types.
llvm-svn: 95414
2010-02-05 19:37:31 +00:00
Chris Lattner
a6d9d45f42 move functions for decoding X86II values into the X86II namespace.
llvm-svn: 95410
2010-02-05 19:24:13 +00:00
Dan Gohman
96cad72d2d Implement releaseMemory in CodeGenPrepare and free the BackEdges
container data. This prevents it from holding onto dangling
pointers and potentially behaving unpredictably.

llvm-svn: 95409
2010-02-05 19:24:11 +00:00
Chris Lattner
326cf88352 constant propagate a method away.
llvm-svn: 95408
2010-02-05 19:20:30 +00:00
Dan Gohman
8142ba6bbb Use a SmallSetVector instead of a SetVector; this code showed up as a
malloc caller in a profile.

llvm-svn: 95407
2010-02-05 19:20:15 +00:00
Chris Lattner
d43a7714c9 change getSizeOfImm and getBaseOpcodeFor to just take
TSFlags directly instead of a TargetInstrDesc.

llvm-svn: 95405
2010-02-05 19:16:26 +00:00
Chris Lattner
f20e6a05bd add some more encodings.
llvm-svn: 95403
2010-02-05 19:04:37 +00:00
Eric Christopher
f89979ce6a Remove this code for now. I have a better idea and will rewrite with
that in mind.

llvm-svn: 95402
2010-02-05 19:04:06 +00:00
Jeffrey Yasskin
d0d363d1a9 Make lit's gtest support honor config.environment.
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Johnny Chen
0b398e3919 VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.
llvm-svn: 95397
2010-02-05 18:04:58 +00:00
Jeffrey Yasskin
1604115c5a Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions.  This patch passes them through the EngineBuilder into
JIT::selectTarget().

llvm-svn: 95390
2010-02-05 16:19:36 +00:00
Bill Wendling
c3f4101cc6 Make test more fucused eliminating extraneous bits.
llvm-svn: 95384
2010-02-05 11:21:05 +00:00
Daniel Dunbar
96bc973155 MC: Change default comment column to 40 characters.
llvm-svn: 95378
2010-02-05 07:32:18 +00:00
Evan Cheng
4b03f55de1 Fix test.
llvm-svn: 95373
2010-02-05 06:37:00 +00:00
Chris Lattner
c59cbacb06 implement the non-relocation forms of memory operands
llvm-svn: 95368
2010-02-05 06:16:07 +00:00
Evan Cheng
81dde4c7f7 Handle tail call with byval arguments.
llvm-svn: 95351
2010-02-05 02:21:12 +00:00
Chris Lattner
adf475aaf7 start adding MRMDestMem, which requires memory form mod/rm encoding
to start limping.

llvm-svn: 95350
2010-02-05 02:18:40 +00:00
Chris Lattner
f1f355c706 Add a few more encodings, we can now encode all of:
pushl	%ebp
	movl	%esp, %ebp
	movl	$42, %eax
	popl	%ebp
	ret

llvm-svn: 95344
2010-02-05 01:53:19 +00:00
Evan Cheng
94fe5501b7 When the scheduler unfold a load folding instruction it move some of the predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit.
rdar://7604000

llvm-svn: 95339
2010-02-05 01:27:11 +00:00
Bill Wendling
9761f067f8 An empty global constant (one of size 0) may have a section immediately
following it. However, the EmitGlobalConstant method wasn't emitting a body for
the constant. The assembler doesn't like that. Before, we were generating this:

  .zerofill __DATA, __common, __cmd, 1, 3

This fix puts us back to that semantic.

llvm-svn: 95336
2010-02-05 00:17:02 +00:00
Bob Wilson
c7e8107ff2 Do not reassociate expressions with i1 type. SimplifyCFG converts some
short-circuited conditions to AND/OR expressions, and those expressions
are often converted back to a short-circuited form in code gen.  The
original source order may have been optimized to take advantage of the
expected values, and if we reassociate them, we change the order and
subvert that optimization.  Radar 7497329.

llvm-svn: 95333
2010-02-04 23:32:37 +00:00
Evan Phoenix
a44be8b7f3 Disable external stubs for X86-32 and X86-64
Instruction selection for X86 now can choose an instruction
sequence that will fit any address of any symbol, no matter
the pointer width. X86-64 uses a mov+call-via-reg sequence
for this.

llvm-svn: 95323
2010-02-04 19:56:59 +00:00
Evan Cheng
ce5962aaf9 Fix typo Duncan noticed.
llvm-svn: 95322
2010-02-04 19:07:06 +00:00
Jakob Stoklund Olesen
54b09bc819 Increase inliner thresholds by 25.
This makes the inliner about as agressive as it was before my changes to the
inliner cost calculations. These levels give the same performance and slightly
smaller code than before.

llvm-svn: 95320
2010-02-04 18:48:20 +00:00
Jakob Stoklund Olesen
d72e82107d Fix small bug in handling instructions with more than one implicitly defined operand.
ProcessImplicitDefs would only mark one operand per instruction with <undef>.
This fixed PR6086.

llvm-svn: 95319
2010-02-04 18:46:28 +00:00
Benjamin Kramer
707c8c5e00 Get the LLVMC tests working with clang++ by removing the problematic CXXFLAG in lit.
llvm-svn: 95318
2010-02-04 18:40:11 +00:00
Torok Edwin
37e451649c New flag for GenLibDeps, and llvm-config-perobjincl.
This allows to show the explicit files that need to be built/linked to get an
LLVM component.

llvm-svn: 95300
2010-02-04 09:31:35 +00:00
Chris Lattner
a635219775 move the PR6214 microoptzn to this file.
llvm-svn: 95299
2010-02-04 07:32:01 +00:00
Chris Lattner
43030eddcd fix a broken archive that was breaking dejagnu only (not lit)
after r95292 

llvm-svn: 95296
2010-02-04 07:11:08 +00:00
Evan Cheng
f5ee7fb571 Re-enable x86 tail call optimization.
llvm-svn: 95295
2010-02-04 06:47:24 +00:00
Eric Christopher
ee4a176739 Temporarily revert this since it appears to have caused a build
failure.

llvm-svn: 95294
2010-02-04 06:41:27 +00:00
Chris Lattner
e43007d443 add support for the sparcv9-*-* target triple to turn on
64-bit sparc codegen.  Patch by Nathan Keynes!

llvm-svn: 95293
2010-02-04 06:34:01 +00:00