Commit Graph

58000 Commits

Author SHA1 Message Date
Fariborz Jahanian 68c4c61be8 Removed a no longer needed FIXME comment.
llvm-svn: 69315
2009-04-16 21:49:16 +00:00
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
Steve Naroff a0c32704e2 Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'.
llvm-svn: 69306
2009-04-16 19:02:57 +00:00
Fariborz Jahanian bcf548760e Category method synbols must be qualified by gategory name to
match gcc's.

llvm-svn: 69305
2009-04-16 18:34:20 +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
Sebastian Redl 1a99f441e6 Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.

llvm-svn: 69299
2009-04-16 17:51:27 +00:00
Eli Friedman 8d25b096fa Attempt to fix a read-after-free running test/Sema/designated-initializers.c.
Douglas, can you check that this is doing the right thing?

llvm-svn: 69298
2009-04-16 17:49:48 +00:00
Eli Friedman 027aa3cb0e Force target triple for test depending on __weak.
llvm-svn: 69297
2009-04-16 17:33:37 +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
Anders Carlsson 8798bd1bf9 When we create an implicit CXXTemporaryObjectExpr we don't need to check that it's a valid init. Instead, just set it as the VarDecl's initializer.
llvm-svn: 69292
2009-04-16 15:50:16 +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
Daniel Dunbar 426b5cf16a Ensure that the most recent declaration of a tentative definition wins
when generating a common definition.

llvm-svn: 69287
2009-04-16 15:34:14 +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
Daniel Dunbar 092f0ccd9c Pass -fdiagnostics-show-option to clang-cc by default.
- <rdar://problem/6796848> implement -fdiagnostics-show-option

llvm-svn: 69276
2009-04-16 06:32:38 +00:00
Chris Lattner f9c2dbb233 other half of 69274
llvm-svn: 69275
2009-04-16 06:17:55 +00:00
Chris Lattner b666a27d24 split diagnostic group definitions out into their own file.
llvm-svn: 69274
2009-04-16 06:17:18 +00:00
Chris Lattner 2d49eed816 optimize and comment GetDiagInfo.
llvm-svn: 69273
2009-04-16 06:13:46 +00:00
Chris Lattner 6c440329f1 merge several scattered tables into StaticDiagInfo.
llvm-svn: 69272
2009-04-16 06:07:15 +00:00
Chris Lattner 6a64cc6776 Implement Diagnostic::getWarningOptionForDiag with information from tblgen,
this implements -fdiagnostics-show-option in clang-cc.

llvm-svn: 69271
2009-04-16 06:00:24 +00:00
Chris Lattner cce520f884 prove diagnostic -> group mapping information.
llvm-svn: 69270
2009-04-16 05:52:18 +00:00
Chris Lattner a538967177 tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.
llvm-svn: 69269
2009-04-16 05:52:14 +00:00
Chris Lattner 22cb818913 implement framework for -fdiagnostics-show-option, but tblgen isn't
passing down the right info yet.

llvm-svn: 69268
2009-04-16 05:44:38 +00:00
Anders Carlsson 805ab5a746 Disable the code I added before until I understand what's causing default2.cpp to fail.
llvm-svn: 69267
2009-04-16 05:35:41 +00:00
Chris Lattner b8e73158e1 move handling of -pedantic and -pedantic-errors into Diagnostics,
out of Warnings.cpp.  This simplifies warnings.cpp and makes it more
efficient.

llvm-svn: 69266
2009-04-16 05:04:32 +00:00
Chris Lattner f9150bac01 arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.

llvm-svn: 69265
2009-04-16 04:32:54 +00:00
Chris Lattner 411c0ffe5d change mappings to distinguish between "unset", "set by the user" and
"set to the default value".

llvm-svn: 69264
2009-04-16 04:12:40 +00:00
Daniel Dunbar 08e82f955a Driver: Remove the majority of -W* options, the driver doesn't
generally need to know about these now we don't have to hold
clang-cc's hand.

llvm-svn: 69263
2009-04-16 04:00:30 +00:00
Chris Lattner af73cf6363 use getDiagnosticLevel instead of getDiagnosticMapping, which
is about to become private.

llvm-svn: 69262
2009-04-16 03:59:32 +00:00
Daniel Dunbar b4b3709c5b Driver: Forward -W* to clang, it can handle all these itself now.
Remove clang_W_Group and clang_ignored_W_Group.

llvm-svn: 69261
2009-04-16 03:44:10 +00:00
Chris Lattner e4f753233b switch DiagMappings *back* to 4 bits per diag.
llvm-svn: 69260
2009-04-16 03:41:37 +00:00
Chris Lattner 169fd70999 implement -Wno-#warnings etc.
llvm-svn: 69259
2009-04-16 03:27:53 +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
Douglas Gregor 6d955a9d25 Eliminate pch::TYPE_ATTR, which is never used
llvm-svn: 69256
2009-04-16 02:45:14 +00:00
Douglas Gregor 4c5cd33527 PCH support for CompoundLiteralExpr. This is the last C expression
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).

llvm-svn: 69255
2009-04-16 02:33:48 +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
Douglas Gregor 38676d50dc PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.
llvm-svn: 69251
2009-04-16 00:55:48 +00:00