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

6160 Commits

Author SHA1 Message Date
Chris Lattner
a7687f805c Go through all kinds of trouble to mark 'blr' as having a predicate operand
that takes a register and condition code.  Print these pieces of BLR the
right way, even though it is currently set to 'always'.

Next up: get the JIT encoding right, then enhance branch folding to produce
predicated blr for simple examples.

llvm-svn: 31449
2006-11-04 05:27:39 +00:00
Chris Lattner
db04ba8502 Describe PPC predicates, which are a pair of CR# and condition.
llvm-svn: 31438
2006-11-03 23:53:25 +00:00
Chris Lattner
4296d2e0fa initial steps to getting the predicate on PPC::BLR right.
llvm-svn: 31437
2006-11-03 23:52:18 +00:00
Chris Lattner
f9394871ff remove dead var
llvm-svn: 31436
2006-11-03 23:50:15 +00:00
Chris Lattner
7c265ad682 remove dead/redundant vars
llvm-svn: 31435
2006-11-03 23:48:56 +00:00
Chris Lattner
a69c6416ca remove redundant/dead vars
llvm-svn: 31434
2006-11-03 23:47:20 +00:00
Chris Lattner
5f953f0927 remove dead vars
llvm-svn: 31433
2006-11-03 23:46:45 +00:00
Chris Lattner
2cb1391e09 add a note
llvm-svn: 31429
2006-11-03 22:27:39 +00:00
Rafael Espindola
3459a4b85b revert previous patch
llvm-svn: 31411
2006-11-03 03:08:28 +00:00
Evan Cheng
54c4be233e Dead code.
llvm-svn: 31405
2006-11-03 02:08:41 +00:00
Rafael Espindola
5cfe91aaca add createCFGSimplificationPass to ARMTargetMachine::addInstSelector
llvm-svn: 31400
2006-11-03 01:39:25 +00:00
Chris Lattner
294085b9be silence warning
llvm-svn: 31395
2006-11-03 01:19:31 +00:00
Chris Lattner
13ae6835d9 silence warnings.
llvm-svn: 31394
2006-11-03 01:18:29 +00:00
Chris Lattner
24e8fdc1f6 silence warning
llvm-svn: 31393
2006-11-03 01:13:15 +00:00
Chris Lattner
71ce2c5de5 silence warnings
llvm-svn: 31392
2006-11-03 01:11:05 +00:00
Reid Spencer
524974949d Make CBackend -pedantic clean.
llvm-svn: 31388
2006-11-03 00:00:57 +00:00
Chris Lattner
d0b2340384 fix a bug reid noticed
llvm-svn: 31385
2006-11-02 23:39:53 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Rafael Espindola
04afe6eb37 move ARMCondCodeToString to ARMAsmPrinter.cpp
remove unused variables from lowerCall

llvm-svn: 31378
2006-11-02 15:00:02 +00:00
Andrew Lenharth
c43c2d6966 fix 2006-11-01-vastart.ll
llvm-svn: 31371
2006-11-02 03:05:26 +00:00
Reid Spencer
1abf69e923 For PR950:
Replace the REM instruction with UREM, SREM and FREM.

llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Chris Lattner
38c04a6bd6 Implement the getRegForInlineAsmConstraint method for PPC. With recent
sdisel changes, this eliminates a ton of copies around common inline asms.
For example:

int test2(int Y, int X) {
  asm("foo %0, %1" : "=r"(X): "r"(X));
  return X;
}

now compiles to:

_test2:
        foo r3, r4
        blr

instead of:

_test2:
        mr r2, r4
        foo r2, r2
        mr r3, r2
        blr

GCC produces:

_test2:
        foo r4, r4
        mr r3,r4
        blr

llvm-svn: 31367
2006-11-02 01:44:04 +00:00
Evan Cheng
1da5ee8485 Rename
llvm-svn: 31364
2006-11-01 23:18:32 +00:00
Evan Cheng
b1ac9f6c12 Added getTiedToSrcOperand() to check for two-address'ness.
llvm-svn: 31360
2006-11-01 23:00:31 +00:00
Rafael Espindola
3ae2b33d17 print null values in bss
llvm-svn: 31349
2006-11-01 14:26:44 +00:00
Rafael Espindola
a52f709418 implement zextload bool and truncstore bool
llvm-svn: 31348
2006-11-01 14:13:27 +00:00
Evan Cheng
790d5c7697 Fix ldmxcsr JIT encoding.
llvm-svn: 31343
2006-11-01 06:53:52 +00:00
Evan Cheng
f49cb35d90 Add constraints to Instruction class.
llvm-svn: 31332
2006-11-01 00:26:27 +00:00
Andrew Lenharth
92b6c807c7 more shotenning
llvm-svn: 31331
2006-10-31 23:46:56 +00:00
Evan Cheng
cabfd99a79 Nuke dead code.
llvm-svn: 31327
2006-10-31 21:53:31 +00:00
Chris Lattner
def30d3eda allow the address of a global to be used with the "i" constraint when in
-static mode.  This implements PR882.

llvm-svn: 31326
2006-10-31 20:13:11 +00:00
Chris Lattner
0571c323bf implement the 'c' inline asm modifier character
llvm-svn: 31325
2006-10-31 20:12:30 +00:00
Andrew Lenharth
cc672e3b2b Let us play simplify the td file (and fix a few missed sub and mul patterns).
llvm-svn: 31322
2006-10-31 19:52:12 +00:00
Chris Lattner
3bed109ed9 handle "st" as "st(0)"
llvm-svn: 31320
2006-10-31 19:42:44 +00:00
Chris Lattner
d9afd310a6 Change the prototype for TargetLowering::isOperandValidForConstraint
llvm-svn: 31318
2006-10-31 19:40:43 +00:00
Andrew Lenharth
c4f8836525 Add all that branch mangling niftiness
llvm-svn: 31313
2006-10-31 16:49:55 +00:00
Rafael Espindola
ba8771a3db add support for calling functions when the caller has variable sized objects
llvm-svn: 31312
2006-10-31 13:03:26 +00:00
Anton Korobeynikov
e6ba8a819c 1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.

llvm-svn: 31311
2006-10-31 08:31:24 +00:00
Anton Korobeynikov
9867bf5eaf Unbreaking static ctors patch.
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.

llvm-svn: 31306
2006-10-31 06:11:06 +00:00
Reid Spencer
0b5a938e79 Make this compile again.
llvm-svn: 31304
2006-10-31 01:45:56 +00:00
Evan Cheng
a8168f310e Apply Aton's LLVM patch for PR973: Linux ctors / dtors support.
llvm-svn: 31303
2006-10-31 01:26:55 +00:00
Chris Lattner
ed0b1b4b24 fix miscompilation of llvm.isunordered, where we branched on the opposite
condition.  This fixes miscompilation of Olden/bh and many others.

llvm-svn: 31301
2006-10-30 23:02:25 +00:00
Reid Spencer
db06ed9156 Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.

llvm-svn: 31299
2006-10-30 22:32:30 +00:00
Chris Lattner
ac9ed02670 fix wonky indentation
llvm-svn: 31298
2006-10-30 22:27:23 +00:00
Evan Cheng
5766dd6455 All targets expand BR_JT for now.
llvm-svn: 31294
2006-10-30 08:02:39 +00:00
Chris Lattner
a478e05437 implement the BlockHasNoFallThrough hook
llvm-svn: 31264
2006-10-28 17:35:02 +00:00
Chris Lattner
dcfee77788 add another target hook for branch folding.
llvm-svn: 31262
2006-10-28 17:29:57 +00:00
Evan Cheng
b60a58362a Doh. Must check if GV is constant first before putting it in .cstring.
llvm-svn: 31253
2006-10-28 05:56:51 +00:00
Evan Cheng
45b6e99308 Doh. Must check if GV is constant first.
llvm-svn: 31252
2006-10-28 05:56:06 +00:00
Chris Lattner
0d69f553c9 don't dist internal readme
llvm-svn: 31247
2006-10-28 00:51:15 +00:00
Chris Lattner
c94f21143f don't dist internal readme's
llvm-svn: 31246
2006-10-28 00:49:54 +00:00
Chris Lattner
b57c880eb0 don't distribute internal readme's
llvm-svn: 31245
2006-10-28 00:48:27 +00:00
Reid Spencer
6719e92a1a Make sure all the readme files get distributed.
llvm-svn: 31244
2006-10-28 00:11:39 +00:00
Chris Lattner
838d0cbb0a this doesn't occur any more in mason
llvm-svn: 31236
2006-10-27 22:02:19 +00:00
Chris Lattner
6fe4efd730 the code in question is now:
cmpw cr0, r7, r3
        ble cr0, LBB1_5 ;bb25
LBB1_8: ;bb17
        cmpw cr0, r8, r5
        bgt cr0, LBB1_2 ;bb

which is just as good as crnand.

llvm-svn: 31235
2006-10-27 22:00:55 +00:00
Evan Cheng
090e9abaee Fixed a significant bug where unpcklpd is incorrectly used to extract element 1 from a v2f64 value.
llvm-svn: 31228
2006-10-27 21:08:32 +00:00
Evan Cheng
a1ce4523e5 Fix for PR968: expand vector sdiv, udiv, srem, urem.
llvm-svn: 31220
2006-10-27 18:49:08 +00:00
Reid Spencer
79e316703d Initialize CStringSection member var.
llvm-svn: 31214
2006-10-27 16:14:06 +00:00
Evan Cheng
9048e1010b Change load PatFrag to ignore indexed load.
llvm-svn: 31210
2006-10-26 21:55:50 +00:00
Evan Cheng
65e78f3d08 Place cstrings in .cstring section.
llvm-svn: 31207
2006-10-26 21:48:57 +00:00
Evan Cheng
3144b839f0 Put cstrings in .cstring section when compiling for Mac OS X.
llvm-svn: 31203
2006-10-26 19:18:18 +00:00
Rafael Espindola
99322ef58c initial support for frame pointers
llvm-svn: 31197
2006-10-26 13:31:26 +00:00
Reid Spencer
b3409f52ef Enclose a case in { and } so that the pickier compilers don't complain.
llvm-svn: 31196
2006-10-26 06:17:40 +00:00
Reid Spencer
6833ffe8b8 For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.

llvm-svn: 31195
2006-10-26 06:15:43 +00:00
Evan Cheng
1abe8bd233 During vector shuffle lowering, we sometimes commute a vector shuffle to try
to match MOVL (movss, movsd, etc.). Don't forget to commute it back and try
unpck* and shufp* if that doesn't pan out.

llvm-svn: 31186
2006-10-25 21:49:50 +00:00
Evan Cheng
034305a2e8 X86ISD::PEXTRW 3rd operand type is always target pointer type.
llvm-svn: 31185
2006-10-25 21:35:05 +00:00
Evan Cheng
01529405c9 Remove -disable-x86-shuffle-opti
llvm-svn: 31183
2006-10-25 20:48:19 +00:00
Devang Patel
0691019e12 Move getPreferredAlignmentLog from AsmPrinter to TargetData
llvm-svn: 31171
2006-10-24 20:32:14 +00:00
Rafael Espindola
a962656c07 expand ISD::VACOPY
llvm-svn: 31170
2006-10-24 20:15:21 +00:00
Chris Lattner
790275342a Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
isel changes happened months ago.

llvm-svn: 31164
2006-10-24 17:09:43 +00:00
Rafael Espindola
2259fab5cf fix warning about missing newline at end of file
llvm-svn: 31162
2006-10-24 17:07:11 +00:00
Chris Lattner
71dc932fcb implement uncond branch insertion, mark branches with isBranch.
llvm-svn: 31160
2006-10-24 16:47:57 +00:00
Chris Lattner
34b009bf45 implement uncond branch insertion for the branch folding pass
llvm-svn: 31159
2006-10-24 16:44:55 +00:00
Chris Lattner
27b79c117a implement uncond branch insertion so alpha works work branchfolding.
llvm-svn: 31158
2006-10-24 16:41:36 +00:00
Chris Lattner
f899cf0dc5 implement uncond branch insertion for sparc to fix regressions from last night
due to branchfolding

llvm-svn: 31157
2006-10-24 16:39:19 +00:00
Chris Lattner
efee605648 new bad case
llvm-svn: 31156
2006-10-24 16:12:47 +00:00
Chris Lattner
e38c95d2a3 Add intrinsics for the rest of the DCB* instructions.
llvm-svn: 31148
2006-10-24 01:08:42 +00:00
Rafael Espindola
70f01d5cc0 implement STRB and STRH
llvm-svn: 31138
2006-10-23 20:34:27 +00:00
Rafael Espindola
357f151d9d expand ISD::MEMSET
llvm-svn: 31137
2006-10-23 20:08:22 +00:00
Chris Lattner
3826e15c8d this part implemented.
llvm-svn: 31122
2006-10-22 21:40:12 +00:00
Anton Korobeynikov
da7897a6c8 Do section switching right way for Mingw\Cygwin and Linux.
This will allow (after llvm-gcc linkage fix) more dummy tests using
libstdc++ to pass on mingw :)

llvm-svn: 31120
2006-10-22 21:37:13 +00:00
Reid Spencer
65b4f5b2dd Don't generate a prototype for _setjmp. At least on Linux, this function
has a different prototype than the one #included from <setjmp.h>. This
patch fixes siod and a number of other test cases on Linux that were
failing the CBE because of this _setjmp issue.

llvm-svn: 31112
2006-10-22 09:58:21 +00:00
Chris Lattner
a9adb1e558 Implement support for branch reversal, fix a bug in branch analysis.
This provides stuff like:

        cmpw cr0, r15, r29
        mr r14, r15
-       bge cr0, LBB3_111       ;bb656
-       b LBB3_90       ;bb501
+       blt cr0, LBB3_90        ;bb501
 LBB3_111:      ;bb656
        lwz r18, 68(r1)

which is particularly good for dispatch group formation.

llvm-svn: 31101
2006-10-21 06:03:11 +00:00
Chris Lattner
016325f336 Implement support for branch condition reversal.
llvm-svn: 31099
2006-10-21 05:52:40 +00:00
Chris Lattner
20bb8bfd45 Simplify code, no functionality change
llvm-svn: 31097
2006-10-21 05:42:09 +00:00
Chris Lattner
d3e583b2e1 implement support for inserting a cond branch
llvm-svn: 31096
2006-10-21 05:36:13 +00:00
Chris Lattner
b638d287f4 allow insertion of a conditional branch with fall-through
llvm-svn: 31095
2006-10-21 05:34:23 +00:00
Chris Lattner
596c126372 update assert message
llvm-svn: 31093
2006-10-21 04:42:29 +00:00
Chris Lattner
3fb2b87f17 bugfix
llvm-svn: 31074
2006-10-20 20:44:34 +00:00
Chris Lattner
62a0f00312 Implement branch analysis/xform hooks required by the branch folding pass.
llvm-svn: 31065
2006-10-20 17:42:20 +00:00
Reid Spencer
d414793dbc For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Rafael Espindola
c08546401b use Pat to implement extloadi8 and extloadi16
llvm-svn: 31052
2006-10-19 17:05:03 +00:00
Rafael Espindola
35e92188e0 implement undef
llvm-svn: 31049
2006-10-19 13:45:00 +00:00
Rafael Espindola
f7a41f3ddd print common symbols
llvm-svn: 31048
2006-10-19 13:30:40 +00:00
Rafael Espindola
722266845b implement extloadi8 and extloadi16
llvm-svn: 31047
2006-10-19 12:45:04 +00:00
Rafael Espindola
17544c1c1d expand SIGN_EXTEND_INREG
llvm-svn: 31046
2006-10-19 12:06:50 +00:00
Rafael Espindola
6cc20c7950 expand brind so that we don't have to implement jump tables right now
llvm-svn: 31045
2006-10-19 10:56:43 +00:00
Chris Lattner
a86fff7583 fit in 80 cols
llvm-svn: 31039
2006-10-18 18:26:48 +00:00
Chris Lattner
fa22dc8afe add a note
llvm-svn: 31038
2006-10-18 17:04:09 +00:00
Rafael Espindola
1220d18e11 add blx
llvm-svn: 31037
2006-10-18 16:21:43 +00:00