Commit Graph

45893 Commits

Author SHA1 Message Date
Chris Lattner 11ceb38df0 make sure to unlock keymgr if the JIT is created and destroyed, all
locks must be matched with unlocks.  Also, use calloc to allocate the
block so that it is properly zero'd.  Thanks to Nick Kledzik for
tracking this down.

llvm-svn: 69314
2009-04-16 21:47:59 +00:00
Bob Wilson de578e8cc6 Add a comment to describe LLVMMatchType.
llvm-svn: 69313
2009-04-16 21:46:42 +00:00
Eli Friedman 929207fd1d Fix for PR3944: make mem2reg O(N) instead of O(N^2) in the number of
incoming edges for a block with many predecessors.

llvm-svn: 69312
2009-04-16 21:40:28 +00:00
Dan Gohman 72dc8452a3 Handle a pointer type correctly in SCEVExpander::visitAddRecExpr.
llvm-svn: 69310
2009-04-16 21:34:54 +00:00
Dan Gohman eefba6bbe0 In the list-burr's pseudo two-addr dependency heuristics, don't
add dependencies on nodes with exactly one successor which is a
COPY_TO_REGCLASS node. In the case that the copy is coalesced
away, the dependence should be on the user of the copy, rather
than the copy itself.

llvm-svn: 69309
2009-04-16 20:59:02 +00:00
Dan Gohman 3027bb6953 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 c1c2ba7a72 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 dab01f3fd6 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 8b6ebb1112 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 e2ead2c328 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 e98ead45e2 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 66e038a3e3 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 a8be04b2db 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 71bccd3e0e 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 9ac4390bf4 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 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