Commit Graph

118476 Commits

Author SHA1 Message Date
Nick Lewycky a461c1c069 Minimize #include's and forward-declares in Target.
llvm-svn: 146335
2011-12-10 22:35:47 +00:00
Nick Lewycky b9cda978ab Refactor the implementation of the TargetOptions out of TargetMachine, taking
the only parts of TM that depends on CodeGen headers with it.

llvm-svn: 146334
2011-12-10 22:34:41 +00:00
Chandler Carruth 1d76d4196a Don't assume things about the exact details of the LLVM version number,
such as what VCS information is attached.

llvm-svn: 146333
2011-12-10 21:40:31 +00:00
Chad Rosier 1c468af854 Revert associate SelectInsertValue test as well.
llvm-svn: 146332
2011-12-10 21:34:28 +00:00
Chad Rosier 3168cabef1 [fast-isel] SelectInsertValue seems to be causing miscompiles for ARM. Disable while I investigate.
llvm-svn: 146331
2011-12-10 21:27:40 +00:00
Greg Clayton 6f6bf26a3e <rdar://problem/9958446>
<rdar://problem/10561406>

Stopped the SymbolFileDWARF::FindFunctions (...) from always calculating
the line table entry for all functions that were found. This can slow down
the expression parser if it ends up finding a bunch of matches. Fixed the 
places that were relying on the line table entry being filled in.

Discovered a recursive stack blowout that happened when "main" didn't have
line info for it and there was no line information for "main"

llvm-svn: 146330
2011-12-10 21:05:26 +00:00
Howard Hinnant 53d2fb0aa2 Installation of CityHash by Craig Silverstein
llvm-svn: 146329
2011-12-10 20:28:56 +00:00
Chad Rosier 6641294e3b Revert r146322 to appease buildbots. Original commit message:
Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for
FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second
attempt.

llvm-svn: 146328
2011-12-10 19:55:03 +00:00
Chad Rosier f70174b869 Typo.
llvm-svn: 146327
2011-12-10 19:48:51 +00:00
Hans Wennborg b1a5e09f6f Check that arguments to a scanf call match the format specifier,
and offer fixits when there is a mismatch.

llvm-svn: 146326
2011-12-10 13:20:11 +00:00
Chandler Carruth 29dad49cfd Use a simpler and more reliable command for converting from HEAD to
commit-ish. Funny thing, they have a command designed for this. ;]

llvm-svn: 146325
2011-12-10 10:18:47 +00:00
Chandler Carruth 7514da903c Teach the VCS detection to set some root-level variables with the raw
revision and git commit data extracted. This will be used in the Clang
CMake build to avoid trying to re-detect the information.

llvm-svn: 146324
2011-12-10 10:04:38 +00:00
Chandler Carruth 667f217a54 At the request of Michael Spencer, make the VCS version detection logic
in CMake a bit more handy. Previously we would get such charming
versions as the following for revision NNNN and commit-ish XXXXX:
  3.1svnsvn-rNNNN
  3.1svngit-svn-rNNNN
  3.1svngit-svn-XXXXX

The mechanism selecting betwene the latter two was particularly odd, and
didn't work with all of the ways git-svn repos are set up apparently. It
also misses an important point -- both the revision *and* the git commit
might be relevant when working on a local branch some distance from
mainline. The new logic does several things:

1) It strips the redundant initial 'svn'.
2) It always looks for a git-svn revision number base, and when found
   includes it in the version.
3) If the git commit-ish for the current HEAD is not exactly that
   revision number, it is also included.

The resulting strings should roughly be:
  3.1svn-rNNNN
  3.1git-svn-rNNNN
  3.1git-svn-rNNNN-XXXXX

Suggestions on formatting etc always welcome. =] I've only looked at the
LLVM version string here, not Clang's (yet).

Note that the commit-ish reported is *not* terribly accurate. It updates
when 'cmake' is run, not when the binary is built. Still, it may be
better than nothing, especially if people have fairly long-lived git
repos and branches. This is not a new limitation, just didn't want
anyone to be surprised.

llvm-svn: 146323
2011-12-10 09:41:13 +00:00
Stepan Dyatkovskiy df0b779e9f Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second attempt.
llvm-svn: 146322
2011-12-10 08:42:24 +00:00
NAKAMURA Takumi 79451e68b2 test/Sema/attr-availability.c: Add explicit -triple x86_64-apple-darwin9, for now.
llvm-svn: 146321
2011-12-10 07:50:30 +00:00
Johnny Chen a9e77784e0 Move some print stmts to the test method, where they get printed only if the test is qualified to run
under the current test driver run configuration.

llvm-svn: 146320
2011-12-10 07:18:11 +00:00
Hal Finkel 67a7f18faf Make CR spill and restore use a reserved register. These operations cannot use the register scavenger because the scavenger can only scavenge one register and frame-index elimination may have already grabbed it.
llvm-svn: 146318
2011-12-10 04:50:53 +00:00
Sean Callanan fd1ba911f8 Fixed a problem where if a frame was present the
expression parser would never try getting typed
variables from the target.

llvm-svn: 146317
2011-12-10 04:03:38 +00:00
Nick Lewycky 8f98e7ec7c Fix typo, reported by Eitan Adler!
llvm-svn: 146316
2011-12-10 03:16:20 +00:00
Sean Callanan 9b3569bacc Two fixes for file variables:
- Even if a frame isn't present, we always try
  to use FindGlobalVariable to find variables.
  Instead of using frame->TrackGlobalVariable()
  to promote the VariableSP into a ValueObject,
  we now simply use ValueObjectVariable.

- When requesting the value of a variable, we
  allow returning of the "live version" of the
  variable -- that is, the variable in the
  target instead of a pointer to its freeze
  dried version in LLDB -- even if there is no
  process present.

llvm-svn: 146315
2011-12-10 03:12:34 +00:00
Jakob Stoklund Olesen 146ac7b609 Try to align the point where a large basic block is split.
The split point is picked such that the newly created water has the same
alignment as the function. This makes the island suitable for constant
pool entries with potentially higher alignment.

This also fixes an issue where the basic block was split one instruction
too late, causing nonconvergence of the algorithm.

<rdar://problem/10550705>

There is still an issue with correctly packing differently aligned
entries in the island.

llvm-svn: 146314
2011-12-10 02:55:10 +00:00
Jakob Stoklund Olesen b3734522fa More debug output formatting.
llvm-svn: 146313
2011-12-10 02:55:06 +00:00
Argyrios Kyrtzidis 173e911394 [libclang] Add defensive checks to make sure we don't try to dereference
a null pointer after getCursorDecl() is called. rdar://10298421.

llvm-svn: 146312
2011-12-10 02:36:25 +00:00
Rafael Espindola c7f355b8e1 Handle expressions of the form _GLOBAL_OFFSET_TABLE_-symbol the same way gas
does. The _GLOBAL_OFFSET_TABLE_ is still magical in that we get a R_386_GOTPC,
but it doesn't change the immediate in the same way as when the expression
has no right hand side symbol.

llvm-svn: 146311
2011-12-10 02:28:43 +00:00
Greg Clayton 3bffb085f4 <rdar://problem/10559329>
An assertion was firing when parsing types due to trying to complete parent
class decl contenxt types too often.

Also, relax where "dsymutil" binary can come from in the Makefile.rules.

llvm-svn: 146310
2011-12-10 02:15:28 +00:00
Jim Ingham 9ee0115147 Don't try to cache the ExecutionContextScope in the ValueObject::EvaluationPoint, it is too
hard to ensure it doesn't get invalidated out from under us.  Instead look it up from the ThreadID
and StackID when asked for it.
<rdar://problem/10554409>

llvm-svn: 146309
2011-12-10 01:49:43 +00:00
Argyrios Kyrtzidis cc6107df08 In ContentCache::replaceBuffer, add sanity check to make sure that we do not free a buffer
and then continue using it. rdar://10359140.

llvm-svn: 146308
2011-12-10 01:38:26 +00:00
Douglas Gregor 8ca0c6408e Make sure that we infer __strong, etc. when we instantiate variables
under ARC. Fixes <rdar://problem/10530209>.

llvm-svn: 146307
2011-12-10 01:22:52 +00:00
Richard Smith 036e2bd07a Add a fast path to the constant evaluator for integer literals. This speeds up
compilation of some translation units of SPEC's 445.gobmk by ~4%, and does not
seem to cause a measurable slowdown in other cases.

llvm-svn: 146306
2011-12-10 01:10:13 +00:00
Argyrios Kyrtzidis 6c8d29f7d1 Add a sanity check in SourceManager::getColumnNumber, make sure
we don't try to access beyond the buffer.

llvm-svn: 146305
2011-12-10 00:30:38 +00:00
Fariborz Jahanian 88d510da9d Add ability to supply additional message to availability macros,
// rdar://10095131

llvm-svn: 146304
2011-12-10 00:28:41 +00:00
Douglas Gregor ddaae8e4e5 Use the right CHECK prefix so that we actually do this checking. Miraculously, this hasn't broken
llvm-svn: 146303
2011-12-10 00:28:18 +00:00
Andrew Trick e8b4f409b2 LSR: ignore strides in outer loops.
Since we're not rewriting IVs in other loops, there's not much reason
to consider their stride when generating formulae.
This should reduce the number of useless formulas considered by LSR.

llvm-svn: 146302
2011-12-10 00:25:00 +00:00
Douglas Gregor c7f46f20d1 When we manage to re-use an expression during tree transformation (=
template instantiation), and that expression might produce a
temporary, invoke MaybeBindToTemporary. Otherwise, we forget to
destroy objects, release objects, etc. Fixes <rdar://problem/10531073>.

llvm-svn: 146301
2011-12-10 00:23:21 +00:00
Jim Grosbach 54337b8617 ARM add some more pre-UAL VFP mnemonics for convenience when porting old code.
llvm-svn: 146300
2011-12-10 00:01:02 +00:00
Eli Friedman 4e36a934dc Splats can contain undef's; make sure to handle them correctly. PR11526.
llvm-svn: 146299
2011-12-09 23:54:42 +00:00
Daniel Dunbar 19939cc380 Driver: Handle -f{no-}honor-infinities, -f{no-}honor-nans, and
-ffinite-math-only.
 - No test case yet, I don't know how to construct a situation where this
   matters.

llvm-svn: 146297
2011-12-09 23:41:18 +00:00
Jim Grosbach 8be2f6577e ARM add some pre-UAL VFP mnemonics for convenience when porting old code.
llvm-svn: 146296
2011-12-09 23:34:09 +00:00
Sean Callanan 8a6a6acd1f Fixed a problem with properties where LLDB was not
creating appropriate setter/getter methods for
property definitions.

llvm-svn: 146295
2011-12-09 23:24:26 +00:00
NAKAMURA Takumi 0cfb3675cb unittests/Support/Path.cpp: [recursive_directory_iterator] Work around for end iterator.
FIXME: It should be more robust.
llvm-svn: 146294
2011-12-09 23:20:03 +00:00
Bill Wendling 3681d1126c Add dump method for debugging.
llvm-svn: 146293
2011-12-09 23:18:34 +00:00
Matt Beaumont-Gay e17b7413e1 Fix up doxyments (\arg vs \p).
llvm-svn: 146292
2011-12-09 23:16:01 +00:00
Eli Friedman de6a86b4f6 Make array new on a pointer to data member type work correctly. PR11523.
llvm-svn: 146291
2011-12-09 23:05:37 +00:00
Richard Smith 0765bec2ad Mechanically convert static_assert_fold to static_assert, now we implement the
C++11 ICE rules.

llvm-svn: 146290
2011-12-09 23:00:37 +00:00
Richard Smith f57d8cb131 C++11 constant expressions: Don't use CheckICE in C++11; instead, determine
whether an expression is a (core) constant expression as a side-effect of
evaluation. This takes us from accepting far too few expressions as ICEs to
accepting slightly too many -- fixes for the remaining cases are coming next.

The diagnostics produced when an expression is found to be non-constant are
currently quite poor (with generic wording but reasonable source locations),
and will be improved in subsequent commits.

llvm-svn: 146289
2011-12-09 22:58:01 +00:00
Bill Wendling 4517fe5020 Random cleanups. No description changes.
llvm-svn: 146288
2011-12-09 22:41:40 +00:00
Ted Kremenek b4a8b056f8 Add clang_getDiagnosticSetFromTU() to libclang. Fixes <rdar://problem/10553081>.
llvm-svn: 146287
2011-12-09 22:28:32 +00:00
Ted Kremenek 2d6d886d73 Sort exports list.
llvm-svn: 146286
2011-12-09 22:28:29 +00:00
Jim Grosbach ef70e9b704 ARM allows '' syntax, not just '#imm' for assembly.
Backwards compatibility with 'gas'. #imm is the preferered and documented
syntax, but lots of existing code uses the '$' prefix, so we should
support it if we can.

llvm-svn: 146285
2011-12-09 22:25:03 +00:00
Kostya Serebryany 3563f8cd41 [asan] call __asan_init from .preinit_array. This simplifies __asan_init vs malloc chicken-and-egg situation on Android and probably on other flavours of Linux. Patch by eugenis@google.com.
llvm-svn: 146284
2011-12-09 22:09:32 +00:00