Commit Graph

53158 Commits

Author SHA1 Message Date
Torok Edwin ec39eb8519 APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.

llvm-svn: 63107
2009-01-27 18:06:03 +00:00
Dan Gohman ed2ba0fb01 Make some comments doxygen-friendly.
llvm-svn: 63104
2009-01-27 17:28:23 +00:00
Eli Friedman 3f66b84c86 Support CodeGen for __extension__ operator on aggregates.
llvm-svn: 63101
2009-01-27 09:03:41 +00:00
Eli Friedman eb3a9b03ab Fix for PR3418: make sure to handle the RHS of expressions starting with
__extension__.  This sort of construct shows up in the gcc source code.

llvm-svn: 63100
2009-01-27 08:43:38 +00:00
Chris Lattner f1ca7d3e02 Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line.  This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not 
dependency generation!).  

This patch also includes several cleanups along the way: 

- SourceLocation now has a dump method, and several other places 
  that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
  simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide 
any #line functionality.

llvm-svn: 63098
2009-01-27 07:57:44 +00:00
Chris Lattner c360bf2e48 rename getFullFilePos -> getFileOffset.
llvm-svn: 63097
2009-01-27 06:27:13 +00:00
Ted Kremenek dd62885f40 Use string comparison rather than '=='.
llvm-svn: 63095
2009-01-27 05:34:28 +00:00
Chris Lattner bf648a3a63 Fix a bug that I noticed by inspection.
llvm-svn: 63094
2009-01-27 05:34:03 +00:00
Chris Lattner 6d61c3e6df make -print-stats print stats about the amount of the SLoc
address space we used up.  Some interesting data:

For c99-intconst-1.c:
6912762 SLocEntry's allocated, 25592386B of Sloc address space used.

For cocoa.h:
26469 SLocEntry's allocated, 10278752B of Sloc address space used.

For carbon.h:
27364 SLocEntry's allocated, 12398141B of Sloc address space used.

Clearly 2G of sloc address space should be enough for anyone?!

llvm-svn: 63093
2009-01-27 05:22:43 +00:00
Chris Lattner 8d3f4a4b2f improvements for GNU objc runtime support, patch by David Chisnall!
llvm-svn: 63092
2009-01-27 05:06:01 +00:00
Owen Anderson 431053ed2c Make the pre-split-limit option more useful by using a per-function counter.
llvm-svn: 63091
2009-01-27 05:01:15 +00:00
Evan Cheng 1bc8af207e Implement multiple with overflow by 2 with an add instruction.
llvm-svn: 63090
2009-01-27 03:30:42 +00:00
Evan Cheng ce95cddd0f Forgot this test case.
llvm-svn: 63089
2009-01-27 02:59:39 +00:00
Dan Gohman 7740523a89 Eliminate unnecessary operands-list traversals.
llvm-svn: 63088
2009-01-27 02:37:43 +00:00
Daniel Dunbar d678d3d970 x86_64: Classify __m64 and __m128 "correctly".
- gcc appears to be classifying <1 x double> as INTEGER which is
   odd. Will investigate later.

llvm-svn: 63086
2009-01-27 02:01:34 +00:00
Chris Lattner 9b415d6142 add SparcV8 asm register info support. Patch by Ben Lickly!
llvm-svn: 63085
2009-01-27 01:58:38 +00:00
Ted Kremenek a3f462e49a PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description'

HTMLDiagnostics:
- Output the bug type field as HTML comments

scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)

llvm-svn: 63084
2009-01-27 01:53:39 +00:00
Daniel Dunbar 0f4aa3cbb1 Implement support for coercion to wider types during ABI handling.
- Code quality is poor, but simple.

llvm-svn: 63083
2009-01-27 01:36:03 +00:00
Ted Kremenek 725fb43012 Have 'Analyzer Failures' files be named to reflect the category of problem.
llvm-svn: 63080
2009-01-27 01:19:08 +00:00
Dan Gohman 52e907a780 Add a FrontendC testcase for the x86-64 Red Zone feature,
to help verify that the feature may be disabled through
the -mno-red-zone option.

llvm-svn: 63079
2009-01-27 00:59:55 +00:00
Dan Gohman 75cee3a93c Enable the red zone on x86-64 by default.
llvm-svn: 63078
2009-01-27 00:58:47 +00:00
Devang Patel 45c899cd15 Assorted debug info fixes.
- DW_AT_bit_size is only suitable for bitfields.
- Encode source location info for derived types.
- Source location and type size info is not useful for subroutine_type (info is included in respective DISubprogram) and array_type.

llvm-svn: 63077
2009-01-27 00:45:04 +00:00
Dan Gohman 8738997c11 Add a regression test for x86-64 red zone usage.
llvm-svn: 63075
2009-01-27 00:40:27 +00:00
Dan Gohman 1cd2a2c9f8 Fix the Red Zone calculation for functions with frame pointers.
Don't use the Red Zone when dynamic stack realignment is needed.
This could be implemented, but most x86-64 ABIs don't require
dynamic stack realignment so it isn't urgent.

llvm-svn: 63074
2009-01-27 00:40:06 +00:00
Dan Gohman 64797bb7bf Add an svn:ignore property.
llvm-svn: 63073
2009-01-27 00:37:09 +00:00
Ted Kremenek 8d178f4357 PTH: Use Token::setLiteralData() to directly store a pointer to cached spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading.
Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file):
- PTH generation time improves by 5%
- PTH reading improves by 0.3%.

llvm-svn: 63072
2009-01-27 00:01:05 +00:00
Fariborz Jahanian d0e8e85afc Added a FIXME.
llvm-svn: 63071
2009-01-26 23:49:05 +00:00
Evan Cheng b8c79bdc31 No need to keep size of DebugLocations vector separately.
llvm-svn: 63070
2009-01-26 23:47:30 +00:00
Daniel Dunbar 7a88d1fcc4 Fix definition of __builtin_ia32_vec_set_v2di and de-XFAIL
builtins-x86.c.

llvm-svn: 63069
2009-01-26 23:43:02 +00:00
Daniel Dunbar fd346a3644 Pull EmitReturnBlock out of FinishFunction and catch unified return
case correctly.

llvm-svn: 63068
2009-01-26 23:27:52 +00:00
Dale Johannesen 03490f0ce1 Testcase for 6522054.
llvm-svn: 63067
2009-01-26 23:22:19 +00:00
Fariborz Jahanian 2612e149ef Build method-description-list for category meta-data
as well (for nonfragile-abi).

llvm-svn: 63062
2009-01-26 22:58:07 +00:00
Douglas Gregor f829825d04 Some micro-optimizations for DISABLE_SMART_POINTERS:
- When it's safe, ActionResult uses the low bit of the pointer for
  the "invalid" flag rather than a separate "bool" value. This keeps
  GCC from generating some truly awful code, for a > 3x speedup in the
  result-passing microbenchmark.
  - When DISABLE_SMART_POINTERS is defined, store an ActionResult
  within ASTOwningResult rather than an ASTOwningPtr. Brings the
  performance benefits of the above to smart pointers with
  DISABLE_SMART_POINTERS defined.

Sadly, these micro-benchmark performance improvements don't seem to
make much of a difference on Cocoa.h right now. However, they're
harmless and might help with future optimizations.

llvm-svn: 63061
2009-01-26 22:44:13 +00:00
Chris Lattner 9240b3eccb rename getSpelledCharacterAt to getSpellingOfSingleCharacterNumericConstant,
optimize it to use the LiteralData when possible.

llvm-svn: 63060
2009-01-26 22:36:52 +00:00
Scott Michel 49483188c3 CellSPU:
- Update DWARF debugging support.

llvm-svn: 63059
2009-01-26 22:33:37 +00:00
Scott Michel 3789a13c30 Make the Dwarf macro information section optional; CellSPU's assembler
doesn't support it. The default is set to 'true', so this should not
impact any other target backends.

llvm-svn: 63058
2009-01-26 22:32:51 +00:00
Chris Lattner d381721810 Fix a bug I introduced in my changes, which caused MeasureTokenLength
to crash when given an instantiation location.  Thanks to Fariborz for
the testcase.

llvm-svn: 63057
2009-01-26 22:24:27 +00:00
Dan Gohman b6d36e1d14 Implement Red Zone utilization on x86-64. This is currently
disabled by default; I'll enable it when I hook it up with
the llvm-gcc flag which controls it.

llvm-svn: 63056
2009-01-26 22:22:31 +00:00
Sebastian Redl b44ab5f25d Add support for member pointers to const_cast.
llvm-svn: 63055
2009-01-26 22:19:12 +00:00
Ted Kremenek 327d00cd45 Silence warning.
llvm-svn: 63054
2009-01-26 22:16:12 +00:00
Ted Kremenek 2483a6126f Add version number to PTH files.
llvm-svn: 63052
2009-01-26 22:15:00 +00:00
Steve Naroff 8cf220398b More updates to VC proj...
llvm-svn: 63050
2009-01-26 22:03:42 +00:00
Owen Anderson e84c3f261e Reapply r63025 and r63026, with fixes for the failing testcases.
llvm-svn: 63049
2009-01-26 21:57:31 +00:00
Duncan Sands d77e476921 Fix PR3393, which amounts to a bug in the expensive
checking logic.  Rather than make the checking more
complicated, I've tweaked some logic to make things
conform to how the checking thought things ought to
be, since this results in a simpler "mental model".

llvm-svn: 63048
2009-01-26 21:54:18 +00:00
Ted Kremenek 978b5becea Add version number checking to PTH files.
llvm-svn: 63047
2009-01-26 21:50:21 +00:00
Ted Kremenek eb8c8fbd63 Embed the offset of the PTH table inside the prologue of the PTH file. This will help improve gradual versioning of PTH files instead of relying that the PTH table is at a fixed offset.
llvm-svn: 63045
2009-01-26 21:43:14 +00:00
Ted Kremenek a26699211d Add method raw_fd_ostream::seek() for random access within a file.
llvm-svn: 63044
2009-01-26 21:42:04 +00:00
Fariborz Jahanian 99113fd577 Method decription meta-data and its setting in class_ro_t
meta-data.

llvm-svn: 63043
2009-01-26 21:38:32 +00:00
Dan Gohman ac272eaf13 At Nick Lewycky's request, rename this test with a more informative name.
llvm-svn: 63042
2009-01-26 21:36:31 +00:00
Bill Wendling e7fa3c37c6 Also revert r63206
llvm-svn: 63041
2009-01-26 21:30:17 +00:00