Chris Lattner
5927443800
Implement full support for parsing primary expressions. We can now parse
...
all of health and voronoi (ignoring directives). We only get 409 lines into
176.gcc though because we don't have binary operators yet:
Parsing 176.gcc.llc.s:409: unexpected token in operand list
movsbl _arityvec+1(,%edi,8), %eax
^
llvm-svn: 73877
2009-06-22 06:32:03 +00:00
Chris Lattner
370f52dc85
implement parser support for '*' operands, as in "call *%eax".
...
llvm-svn: 73876
2009-06-22 06:02:13 +00:00
Chris Lattner
06378f9853
implement memory operand parsing.
...
llvm-svn: 73875
2009-06-22 05:51:26 +00:00
Dale Johannesen
bb07cd38e3
Testcase for (llvm-gcc) 73873. Usually
...
std::pair<double, float*>
is 16 bytes on darwin-powerpc, but not always.
See testcase for full weirdness.
llvm-svn: 73874
2009-06-22 04:47:32 +00:00
Dan Gohman
d65752db50
Factor out code for computing umin and smin for SCEV expressions into
...
helper functions. Based on a patch by Nick Lewycky.
llvm-svn: 73869
2009-06-22 03:18:45 +00:00
Chris Lattner
82084cf5a1
start implementing some simple operand parsing.
...
llvm-svn: 73867
2009-06-22 01:29:09 +00:00
Dan Gohman
db7860aa40
Teach ScalarEvolution how to analyze loops with multiple exit
...
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.
llvm-svn: 73866
2009-06-22 00:31:57 +00:00
Dan Gohman
b2c544ddbd
Delete an unused variable.
...
llvm-svn: 73865
2009-06-22 00:19:17 +00:00
Dan Gohman
8426522d55
Fix this code to correctly handle loops with multiple exits. Until
...
now, this hasn't mattered, because ScalarEvolution hasn't been able
to compute trip counts for loops with multiple exits. But it will
soon.
llvm-svn: 73864
2009-06-22 00:15:15 +00:00
Dan Gohman
1a33c92bb2
Rename a variable for consistency with the ExitBlock vs ExitingBlock
...
terminology that LoopInfo uses.
llvm-svn: 73863
2009-06-21 23:48:38 +00:00
Dan Gohman
eb0a67278b
Fix ScalarEvolution's backedge-taken count computations to check for
...
overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
2009-06-21 23:46:38 +00:00
Chris Lattner
dd95ab3ca9
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
f896c01361
set up the top-level parsing loop.
...
llvm-svn: 73860
2009-06-21 20:54:55 +00:00
Chris Lattner
89e17d02b1
stub out parser for asm files. Change invariant on lexer to always
...
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode. Add new
-as-lex option to enable lexing mode (vs parsing mode).
llvm-svn: 73859
2009-06-21 20:16:42 +00:00
Chris Lattner
26507d1082
add string literals.
...
llvm-svn: 73858
2009-06-21 19:56:35 +00:00
Chris Lattner
9f3189ec41
hopefully fix the build on linux.
...
llvm-svn: 73857
2009-06-21 19:43:50 +00:00
Chris Lattner
9e30cac8cf
simplify some error recovery stuff.
...
llvm-svn: 73856
2009-06-21 19:22:49 +00:00
Chris Lattner
b6cfcfadd4
implement enough of a lexer to get through Olden/health/Output/health.llc.s
...
without errors.
llvm-svn: 73855
2009-06-21 19:21:25 +00:00
Rafael Espindola
373c6bdbc5
Fix PR4185.
...
Handle FpSET_ST0_80 being used when ST0 is still alive.
llvm-svn: 73850
2009-06-21 12:02:51 +00:00
Chris Lattner
f0c5d670e0
oh yeah, cmake needs to be told explicitly about new files :)
...
llvm-svn: 73849
2009-06-21 07:19:34 +00:00
Chris Lattner
7a7ac287db
some baby steps.
...
llvm-svn: 73848
2009-06-21 07:19:10 +00:00
Chris Lattner
8646a745ca
prune #include, fix warning.
...
llvm-svn: 73847
2009-06-21 05:33:06 +00:00
Chris Lattner
c94208cf9c
start wiring up support for asm parsing.
...
llvm-svn: 73846
2009-06-21 05:22:37 +00:00
Chris Lattner
c865ea76a6
move include searching logic from TGLexer to SourceMgr.
...
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
5b9a2d79c0
Rename TGSourceMgr -> SourceMgr.
...
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
4ff2620742
rename TGLoc -> SMLoc.
...
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
4ed87b8790
move TGSourceMgr class out of TableGen into libsupport.
...
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Chris Lattner
06e180b758
simplify closing paren and (rip) printing.
...
llvm-svn: 73841
2009-06-21 02:22:53 +00:00
Chris Lattner
e358de060d
indentation fix
...
llvm-svn: 73840
2009-06-21 02:22:34 +00:00
Nick Lewycky
4020821885
Expand this test to handle more cases (remainder and shifts) of zero.
...
llvm-svn: 73839
2009-06-21 01:56:41 +00:00
Chris Lattner
a01650186d
fit in 80 cols
...
llvm-svn: 73838
2009-06-21 01:52:00 +00:00
Chris Lattner
481746a193
remove #if 0 code
...
llvm-svn: 73837
2009-06-21 01:48:49 +00:00
Chris Lattner
5ef06d833d
cosmetic changes.
...
llvm-svn: 73836
2009-06-21 01:27:55 +00:00
Chris Lattner
affcc71da2
implement PR4424: 0/x is always 0 for integer division.
...
llvm-svn: 73835
2009-06-21 01:15:55 +00:00
Chris Lattner
580eecebbd
change TLS_ADDR lowering to lower to a real mem operand, instead of matching as
...
a global with that gets printed with the :mem modifier. All operands to lea's
should be handled with the lea32mem operand kind, and this allows the TLS stuff
to do this. There are several better ways to do this, but I went for the minimal
change since I can't really test this (beyond make check).
This also makes the use of EBX explicit in the operand list in the 32-bit,
instead of implicit in the instruction.
llvm-svn: 73834
2009-06-20 20:38:48 +00:00
Chris Lattner
965cc0e45b
no need for unwind info
...
llvm-svn: 73832
2009-06-20 19:48:26 +00:00
Chris Lattner
33d1976328
no need for unwind info here.
...
llvm-svn: 73831
2009-06-20 19:43:09 +00:00
Chris Lattner
f1510099c3
remove dead code, the main codepath never has to deal
...
with MBB's.
llvm-svn: 73830
2009-06-20 19:34:47 +00:00
Chris Lattner
12ba79a2b7
eliminate the "call" operand modifier from the asm descriptions, modeling
...
it as a pcrel immediate instead. This gets pc-rel weirdness out of the
main printoperand codepath.
llvm-svn: 73829
2009-06-20 19:34:09 +00:00
Duncan Sands
02f2e932e3
Clarify that if the alignment is zero then an alignment
...
compatible with the type will be used (at least the ABI
alignment).
llvm-svn: 73827
2009-06-20 13:26:06 +00:00
Chris Lattner
b0324ab35a
fix edit-o
...
llvm-svn: 73824
2009-06-20 08:13:12 +00:00
Chris Lattner
3ffae2f77e
some comments and cleanup
...
llvm-svn: 73818
2009-06-20 07:59:10 +00:00
Chris Lattner
7b43ca847d
implement support for lowering subregs when preparing to print
...
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.
Implement support for printing mbb labels as operands.
llvm-svn: 73817
2009-06-20 07:03:18 +00:00
Evan Cheng
b45918e5bb
Fix PR4419: handle defs of partial uses.
...
llvm-svn: 73816
2009-06-20 04:34:51 +00:00
Devang Patel
a011b501a0
Remove unused field.
...
llvm-svn: 73815
2009-06-20 01:07:54 +00:00
Devang Patel
7003004d00
Initialize MMI
...
llvm-svn: 73813
2009-06-20 01:00:07 +00:00
Chris Lattner
18485eef13
hook up printMemReference.
...
llvm-svn: 73811
2009-06-20 00:50:32 +00:00
Chris Lattner
19fc691c16
Start implementing translation of MachineInstr to MCInst. Next
...
step is to make tblgen generate something more appropriate for MCInst,
and generate calls to operand translation routines where needed.
This includes a bunch of #if 0 code which will slowly be refactored into
something sensible.
llvm-svn: 73810
2009-06-20 00:49:26 +00:00
Chris Lattner
fba2cdee3d
make immediates be int64_t like machineoperand. Add some apis
...
llvm-svn: 73809
2009-06-20 00:47:37 +00:00
Dan Gohman
b60dedbf0a
Tweak this test to be a little less unusual.
...
llvm-svn: 73808
2009-06-20 00:40:56 +00:00