Commit Graph

45878 Commits

Author SHA1 Message Date
Rafael Espindola 5e42177a0f fix PR3995. A scale must be 1, 2, 4 or 8.
llvm-svn: 69284
2009-04-16 12:34:53 +00:00
Chris Lattner cce520f884 prove diagnostic -> group mapping information.
llvm-svn: 69270
2009-04-16 05:52:18 +00:00
Dan Gohman 0a40ad93a9 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 1e86593b6a encode subgroups into the clang .inc file. -Wall now works!
llvm-svn: 69257
2009-04-16 03:16:12 +00:00
Devang Patel 653dee0884 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 46b04e4d06 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 43fc7e481b 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 13507d6cba start producing subgroup info.
llvm-svn: 69249
2009-04-16 00:53:25 +00:00
Dale Johannesen 8958f4f30f Another testcase for IV shortening.
llvm-svn: 69247
2009-04-16 00:45:21 +00:00
Dale Johannesen a71daa83c6 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 4816a3488f make sure that empty diag groups get known by clang.
llvm-svn: 69235
2009-04-15 22:33:02 +00:00
Chris Lattner bcba418569 implement support for writing out diagnostic group tables.
llvm-svn: 69219
2009-04-15 20:55:08 +00:00
Devang Patel 31043aa200 s/RootDbgScope/FunctionDbgScope/g
llvm-svn: 69216
2009-04-15 20:41:31 +00:00
Dale Johannesen 82230b5b17 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 e05d99f604 use UppercaseString instead of EmitAllCaps
llvm-svn: 69213
2009-04-15 20:16:12 +00:00
Chris Lattner 3983dfdc83 use escape string.
llvm-svn: 69212
2009-04-15 20:13:18 +00:00
Chris Lattner baf9535284 teach EscapeString and UnescapeString to handle ".
llvm-svn: 69211
2009-04-15 20:12:52 +00:00
Devang Patel 2738d7312a 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 8aa28b9c34 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 c2ac800cd7 rename -gen-clang-diags-options -> -gen-clang-diag-groups
llvm-svn: 69208
2009-04-15 20:02:32 +00:00
Chris Lattner b4494eb887 move clang-specific makefile goop to clang makefile.
llvm-svn: 69206
2009-04-15 19:57:42 +00:00
Dan Gohman de7b3e74be Fix 80-column violations.
llvm-svn: 69204
2009-04-15 19:48:57 +00:00
Dan Gohman 6711216e84 Add a folding table entry for MOV8rr_NOREX.
llvm-svn: 69203
2009-04-15 19:48:28 +00:00
Devang Patel 70307db0d5 Check isInlinedSubroutine() before creating DW_TAG_inlined_subroutine.
llvm-svn: 69202
2009-04-15 19:42:57 +00:00
Dan Gohman 37608532c4 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 06a7f37265 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 4e7b579ecc include the default mapping in the clang diagnostic .inc files.
llvm-svn: 69173
2009-04-15 16:43:18 +00:00
Chris Lattner 3dfaeeaefc minor cleanups
llvm-svn: 69152
2009-04-15 06:26:49 +00:00
Nick Lewycky 4a7bcf6410 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 0da0f22545 Allow jumping to the end of a bitstream while reading
llvm-svn: 69145
2009-04-15 04:53:47 +00:00
Bill Wendling 066b8023a4 Check for alignment.
llvm-svn: 69140
2009-04-15 04:51:05 +00:00
Bill Wendling 64602b1ed6 More obsessive reformatting. Fixed some validation errors.
llvm-svn: 69130
2009-04-15 02:12:37 +00:00
Dan Gohman 3fea040c19 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 19e7a32457 Fix doxygen comment syntax.
llvm-svn: 69128
2009-04-15 01:44:07 +00:00
Dan Gohman 6f873b446a Fix X86MachineFunctionInfo's doxygen comment.
llvm-svn: 69127
2009-04-15 01:20:18 +00:00
Dan Gohman 210448c233 Move MachineRegisterInfo::setRegClass out of line.
llvm-svn: 69126
2009-04-15 01:19:35 +00:00
Dan Gohman 505065cdd0 Move MachineJumpTableInfo::ReplaceMBBInJumpTables out of line.
llvm-svn: 69125
2009-04-15 01:18:49 +00:00
Dan Gohman 89892b05c7 Give RemoveRegOperandFromRegInfo a comment and move the
code out of line.

llvm-svn: 69124
2009-04-15 01:17:37 +00:00
Dale Johannesen 7ffb7d5728 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 ffb83a155e 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
Devang Patel 046bf624b9 While inlining, clone llvm.dbg.func.start intrinsic and adjust
llvm.dbg.region.end instrinsic. This nested llvm.dbg.func.start/llvm.dbg.region.end pair now enables DW_TAG_inlined_subroutine support in code generator.

llvm-svn: 69118
2009-04-15 00:17:06 +00:00
Chris Lattner 0813c0c34c silence a warning.
llvm-svn: 69117
2009-04-15 00:16:05 +00:00
Devang Patel 32d17a1a29 Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine scopes (only in FastISel mode).
llvm-svn: 69116
2009-04-15 00:10:26 +00:00
Dan Gohman dd07f638f5 Do for GR16_NOREX what r69049 did for GR8_NOREX, to avoid trouble with
the local register allocator.

llvm-svn: 69115
2009-04-15 00:10:16 +00:00
Devang Patel 1be3b53d3c Add a method to check that the subprogram holds debug info for the given Function or not.
llvm-svn: 69113
2009-04-15 00:06:07 +00:00
Dan Gohman 7913ea5e4a Add a new MOV8rr_NOREX, and make X86's copyRegToReg use it when
either the source or destination is a physical h register.

This fixes sqlite3 with the post-RA scheduler enabled.

llvm-svn: 69111
2009-04-15 00:04:23 +00:00
Bill Wendling e665e3cf2f Testcase for r69104.
llvm-svn: 69110
2009-04-15 00:04:11 +00:00
Dan Gohman 821e13a8f4 GR8_NOREX can contain the H registers, since they don't require
REX prefixes.

llvm-svn: 69108
2009-04-15 00:00:48 +00:00
Evan Cheng 5ebf2acd84 Optimize conditional branch on i1 phis with non-constant inputs.
This turns:

eq:
        %3 = icmp eq i32 %1, %2
        br label %join

ne:
        %4 = icmp ne i32 %1, %2
        br label %join

join:
        %5 = phi i1 [%3, %eq], [%4, %ne]
        br i1 %5, label %yes, label %no

=>

eq:
        %3 = icmp eq i32 %1, %2
        br i1 %3, label %yes, label %no

ne:
        %4 = icmp ne i32 %1, %2
        br i1 %4, label %yes, label %no

llvm-svn: 69102
2009-04-14 23:40:03 +00:00
Dan Gohman 86e43e7999 Fix the RUN lines so that this test actually tests.
llvm-svn: 69096
2009-04-14 22:50:17 +00:00