Dan Gohman
2165510df6
Handle SUBREG_TO_REG instructions with the same heuristics
...
as INSERT_SUBREG instructions in the list-burr scheduler.
llvm-svn: 69308
2009-04-16 20:57:10 +00:00
Dan Gohman
99b21e5635
Fix a bug with inttoptr/ptrtoint casts where the pointer has a different
...
size from the integer, requiring zero extension or truncation. Don't
create ZExtInsts with pointer types. This fixes a regression in
consumer-jpeg.
llvm-svn: 69307
2009-04-16 19:25:55 +00:00
Devang Patel
d324ddbd7b
Do not treat beginning of inlined scope as beginning of normal function scope if the location info is missing.
...
Insetad of doing ...
if (inlined_subroutine && known_location)
DW_TAG_inline_subroutine
else
DW_TAG_subprogram
do
if (inlined_subroutine) {
if (known_location)
DW_TAG_inline_subroutine
} else {
DW_TAG_subprogram
}
llvm-svn: 69300
2009-04-16 17:55:30 +00:00
Dan Gohman
f2bec6720f
Minor code simplifications. Don't attempt LSR on theoretical
...
targets with pointers larger than 64 bits, due to the code not
yet being APInt clean.
llvm-svn: 69296
2009-04-16 16:49:48 +00:00
Dan Gohman
67ad4ee457
LSR is no longer a GEP optimizer. It is now an IV expression
...
optimizer, which just happen to frequently involve optimizing GEPs.
llvm-svn: 69295
2009-04-16 16:46:01 +00:00
Dan Gohman
f7f9a14400
Fix SCEVExpander::visitSMaxExpr and SCEVExpander::visitUMaxExpr to
...
not create ICmpInsts with operands of different types. This fixes
a regression in Applications/d/make_dparser.
llvm-svn: 69294
2009-04-16 16:15:25 +00:00
Dan Gohman
1482541677
Teach SCEVExpander::InsertCastOfTo to avoid creating inttoptr-of-ptrtoint
...
and ptrtoint-of-inttoptr expressions. This fixes a regression in 300.twolf.
llvm-svn: 69293
2009-04-16 15:52:57 +00:00
Dan Gohman
b40c343360
Use ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
...
since the operand is always a constant.
llvm-svn: 69291
2009-04-16 15:48:38 +00:00
Dan Gohman
862f4743b8
Use a SCEV expression cast instead of immediately inserting a
...
new instruction with SCEVExpander::InsertCastOfTo.
llvm-svn: 69290
2009-04-16 15:47:35 +00:00
Devang Patel
6052d698f5
Record line number at the beginning of a func.start.
...
This line was accidently lost yesterday.
llvm-svn: 69286
2009-04-16 15:07:09 +00:00
Rafael Espindola
a07d1c3103
fix PR3995. A scale must be 1, 2, 4 or 8.
...
llvm-svn: 69284
2009-04-16 12:34:53 +00:00
Chris Lattner
1a7c8feff3
prove diagnostic -> group mapping information.
...
llvm-svn: 69270
2009-04-16 05:52:18 +00:00
Dan Gohman
98aa1d9693
Expand GEPs in ScalarEvolution expressions. SCEV expressions can now
...
have pointer types, though in contrast to C pointer types, SCEV
addition is never implicitly scaled. This not only eliminates the
need for special code like IndVars' EliminatePointerRecurrence
and LSR's own GEP expansion code, it also does a better job because
it lets the normal optimizations handle pointer expressions just
like integer expressions.
Also, since LLVM IR GEPs can't directly index into multi-dimensional
VLAs, moving the GEP analysis out of client code and into the SCEV
framework makes it easier for clients to handle multi-dimensional
VLAs the same way as other arrays.
Some existing regression tests show improved optimization.
test/CodeGen/ARM/2007-03-13-InstrSched.ll in particular improved to
the point where if-conversion started kicking in; I turned it off
for this test to preserve the intent of the test.
llvm-svn: 69258
2009-04-16 03:18:22 +00:00
Chris Lattner
3984f99025
encode subgroups into the clang .inc file. -Wall now works!
...
llvm-svn: 69257
2009-04-16 03:16:12 +00:00
Devang Patel
87488c2a88
In -fast mode do what FastISel does.
...
This code could use some refactoring help!
llvm-svn: 69254
2009-04-16 02:33:41 +00:00
Devang Patel
d9a9d5bdbb
If FastISel is run and it has known DebugLoc then use it.
...
llvm-svn: 69253
2009-04-16 01:33:10 +00:00
Devang Patel
c6c6759194
If location where the function was inlined is not know then do not emit debug info describing inlinied region.
...
llvm-svn: 69252
2009-04-16 01:31:54 +00:00
Chris Lattner
1d21ddd345
start producing subgroup info.
...
llvm-svn: 69249
2009-04-16 00:53:25 +00:00
Dale Johannesen
040d118b17
Another testcase for IV shortening.
...
llvm-svn: 69247
2009-04-16 00:45:21 +00:00
Dale Johannesen
ab8b46beca
Eliminate zext over (iv | const) or (signed iv),
...
and sext over (iv | const), if a longer iv is
available. Allow expressions to have more than
one zext/sext parent. All from OpenSSL.
llvm-svn: 69241
2009-04-15 23:31:51 +00:00
Chris Lattner
48fcc3fe58
make sure that empty diag groups get known by clang.
...
llvm-svn: 69235
2009-04-15 22:33:02 +00:00
Chris Lattner
265ef76440
implement support for writing out diagnostic group tables.
...
llvm-svn: 69219
2009-04-15 20:55:08 +00:00
Devang Patel
4a18de4193
s/RootDbgScope/FunctionDbgScope/g
...
llvm-svn: 69216
2009-04-15 20:41:31 +00:00
Dale Johannesen
98c9716c34
Eliminate zext over (iv & const) or ((iv+const)&const)
...
if a longer iv is available. These subscript forms are
not common; they're a bottleneck in OpenSSL.
llvm-svn: 69215
2009-04-15 20:41:02 +00:00
Chris Lattner
1a1ffcb4a4
use UppercaseString instead of EmitAllCaps
...
llvm-svn: 69213
2009-04-15 20:16:12 +00:00
Chris Lattner
3ab2b0ca2b
use escape string.
...
llvm-svn: 69212
2009-04-15 20:13:18 +00:00
Chris Lattner
b46ad5bbba
teach EscapeString and UnescapeString to handle ".
...
llvm-svn: 69211
2009-04-15 20:12:52 +00:00
Devang Patel
21463f4a25
Add DISubprogram is not null check.
...
This fixes test/CodeGen//2009-01-21-invalid-debug-info.m test case.
llvm-svn: 69210
2009-04-15 20:11:08 +00:00
Dan Gohman
5555c4538b
Generalize one of the SelectionDAG::ReplaceAllUsesWith overloads
...
to support replacing a node with another that has a superset of
the result types. Use this instead of calling
ReplaceAllUsesOfValueWith for each value.
llvm-svn: 69209
2009-04-15 20:06:30 +00:00
Chris Lattner
049e984de6
rename -gen-clang-diags-options -> -gen-clang-diag-groups
...
llvm-svn: 69208
2009-04-15 20:02:32 +00:00
Chris Lattner
01ad312099
move clang-specific makefile goop to clang makefile.
...
llvm-svn: 69206
2009-04-15 19:57:42 +00:00
Dan Gohman
38bc0faa22
Fix 80-column violations.
...
llvm-svn: 69204
2009-04-15 19:48:57 +00:00
Dan Gohman
a2ec3156eb
Add a folding table entry for MOV8rr_NOREX.
...
llvm-svn: 69203
2009-04-15 19:48:28 +00:00
Devang Patel
d9d88a827d
Check isInlinedSubroutine() before creating DW_TAG_inlined_subroutine.
...
llvm-svn: 69202
2009-04-15 19:42:57 +00:00
Dan Gohman
420019a18a
Fix MachineInstr::getNumExplicitOperands to count
...
variadic operands correctly. Patch by Jakob Stoklund Olesen!
llvm-svn: 69190
2009-04-15 17:59:11 +00:00
Chris Lattner
c4bf4ef9cc
don't infer diag class from parenting relations, make it an explicit field
...
in the record.
llvm-svn: 69176
2009-04-15 16:55:46 +00:00
Chris Lattner
9e2f6e304c
include the default mapping in the clang diagnostic .inc files.
...
llvm-svn: 69173
2009-04-15 16:43:18 +00:00
Chris Lattner
03d5a78eca
minor cleanups
...
llvm-svn: 69152
2009-04-15 06:26:49 +00:00
Nick Lewycky
e9597399f0
Limit the number of times we're willing to chase pointers. Removes an O(n^2)
...
problem from instcombine.
llvm-svn: 69151
2009-04-15 06:23:41 +00:00
Douglas Gregor
8965c485d7
Allow jumping to the end of a bitstream while reading
...
llvm-svn: 69145
2009-04-15 04:53:47 +00:00
Bill Wendling
4153589196
Check for alignment.
...
llvm-svn: 69140
2009-04-15 04:51:05 +00:00
Bill Wendling
1b271d471e
More obsessive reformatting. Fixed some validation errors.
...
llvm-svn: 69130
2009-04-15 02:12:37 +00:00
Dan Gohman
a1eee28415
Don't use "protected:" in classes that aren't intended to be
...
subclassed.
llvm-svn: 69129
2009-04-15 01:47:03 +00:00
Dan Gohman
f023ab3fae
Fix doxygen comment syntax.
...
llvm-svn: 69128
2009-04-15 01:44:07 +00:00
Dan Gohman
2b965abea4
Fix X86MachineFunctionInfo's doxygen comment.
...
llvm-svn: 69127
2009-04-15 01:20:18 +00:00
Dan Gohman
e1e53b379b
Move MachineRegisterInfo::setRegClass out of line.
...
llvm-svn: 69126
2009-04-15 01:19:35 +00:00
Dan Gohman
a885b48029
Move MachineJumpTableInfo::ReplaceMBBInJumpTables out of line.
...
llvm-svn: 69125
2009-04-15 01:18:49 +00:00
Dan Gohman
c9b68844d6
Give RemoveRegOperandFromRegInfo a comment and move the
...
code out of line.
llvm-svn: 69124
2009-04-15 01:17:37 +00:00
Dale Johannesen
427e9aade9
Enhance induction variable code to remove the
...
sext around sext(shorter IV + constant), using a
longer IV instead, when it can figure out the
add can't overflow. This comes up a lot in
subscripting; mainly affects 64 bit.
llvm-svn: 69123
2009-04-15 01:10:12 +00:00
Evan Cheng
bd35a81da5
Avoid making the transformation enabled by my last patch if the new destinations have phi nodes.
...
llvm-svn: 69121
2009-04-15 00:43:54 +00:00