Commit Graph

129400 Commits

Author SHA1 Message Date
Hans Wennborg cbe34b4cc9 Extend the IL for selecting TLS models (PR9788)
This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as

  @x = thread_local(initialexec) global i32 42

if it will not be used in a shared library that is dlopen'ed.

If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.

llvm-svn: 159077
2012-06-23 11:37:03 +00:00
Stepan Dyatkovskiy 8e00efeace Optimized usage of new SwitchInst case values (IntegersSubset type) in Local.cpp, Execution.cpp and BitcodeWriter.cpp.
I got about 1% of compile-time improvement on my machines (Ubuntu 11.10 i386 and Ubuntu 12.04 x64).

llvm-svn: 159076
2012-06-23 10:58:58 +00:00
Craig Topper 8c03ea79c4 Use correct memory types for (V)CVTDQ2PD instructions.
llvm-svn: 159075
2012-06-23 08:30:27 +00:00
Craig Topper 2361cd9897 Silence an unused variable warning on release builds.
llvm-svn: 159074
2012-06-23 08:09:30 +00:00
Craig Topper 1cac50bc5e Compress flags in X86 op folding to reduce space in static tables.
llvm-svn: 159073
2012-06-23 08:01:18 +00:00
Alexis Hunt 6aa9beef50 Clean up a large number of C++11 attribute parse issues, including parsing
attributes in more places where we didn't and catching a lot more issues.

This implements nearly every aspect of C++11 attribute parsing, except for:
 - Attributes are permitted on explicit instantiations inside the declarator
   (but not preceding the decl-spec)
 - Attributes are permitted on friend declarations of functions.
 - Multiple instances of the same attribute in an attribute-list (e.g.
   [[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming)
   are allowed.
The first two are marked as expected-FIXME in the test file and the latter
is probably a defect and is currently untested.

Thanks to Richard Smith for providing the lion's share of the testcases.

llvm-svn: 159072
2012-06-23 05:07:58 +00:00
Craig Topper d9c7d0dda4 Make helper method static since it doesn't use anything in the class.
llvm-svn: 159071
2012-06-23 04:58:41 +00:00
Craig Topper 431f1e7192 Remove intrinsic specific instructions for 128-bit (V)CVTDQ2PD. Replace with intrinsic patterns. Mem forms omitted because the load size is only 64-bits.
llvm-svn: 159070
2012-06-23 04:23:36 +00:00
Jakob Stoklund Olesen 502e4c6ac4 Teach LiveVariables to handle <undef> operands.
It's simple: Don't treat <undef> operands as uses, and don't assume a
virtual register has a defining instruction unless a real use has been
seen.

llvm-svn: 159061
2012-06-23 02:23:00 +00:00
Nico Weber 3a691a367c Support L__FUNCTION__ in microsoft mode, PR11789
Heavily based on a patch from
Aaron Wishnick <aaron.s.wishnick@gmail.com>.

I'll clean up the duplicated function in CodeGen as
a follow-up, later today or tomorrow.

llvm-svn: 159060
2012-06-23 02:07:59 +00:00
Timur Iskhodzhanov 9137c399bd [Windows] Fix mangling of repeated types in the presence of bool and function pointers PR13176,PR13177
llvm-svn: 159059
2012-06-23 00:54:17 +00:00
Rafael Espindola a3088f09b3 Handle aliases to tls variables in all architectures, not just x86.
llvm-svn: 159058
2012-06-23 00:30:03 +00:00
Evan Cheng 68c2f9a9a7 (sub X, imm) gets canonicalized to (add X, -imm)
There are patterns to handle immediates when they fit in the immediate field.
e.g. %sub = add i32 %x, -123
=>   sub r0, r0, #123
Add patterns to catch immediates that do not fit but should be materialized
with a single movw instruction rather than movw + movt pair.
e.g. %sub = add i32 %x, -65535
=>   movw r1, #65535
     sub r0, r0, r1

rdar://11726136

llvm-svn: 159057
2012-06-23 00:29:06 +00:00
Charles Davis de2e5ed4aa MicrosoftMangle: Fix mangling of integral constant non-type template arguments in a class specialization.
llvm-svn: 159056
2012-06-23 00:27:49 +00:00
Nuno Lopes de8c6fb24f BoundsChecking: attach debug info to traps to make my life a bit more sane
llvm-svn: 159055
2012-06-23 00:12:34 +00:00
Richard Smith 19b02cd7fc Minor improvements to some C99 variadic-macro-related diagnostics.
llvm-svn: 159054
2012-06-22 23:59:08 +00:00
Jim Grosbach 087affe2f3 ARM: Add a better diagnostic for some out of range immediates.
As an example of how the custom DiagnosticType can be used to provide
better operand-mismatch diagnostics, add a custom diagnostic for
the imm0_15 operand class used for several system instructions.
Update the tests to expect the improved diagnostic.

rdar://8987109

llvm-svn: 159051
2012-06-22 23:56:48 +00:00
Jim Grosbach 3a8a0fa8e6 TableGen: AsmMatcher support for better operand diagnostics.
"Invalid operand" may be a completely correct diagnostic, but it's often
insufficiently specific to really help identify and fix the problem in
assembly source. Allow a target to specify a more-specific diagnostic kind
for each AsmOperandClass derived definition and use that to provide
more detailed diagnostics when an operant of that class resulted in a
match failure.

rdar://8987109

llvm-svn: 159050
2012-06-22 23:56:44 +00:00
Ted Kremenek 72b3452c2b Implement initial static analysis inlining support for C++ methods.
llvm-svn: 159047
2012-06-22 23:55:50 +00:00
Kaelyn Uhrain 9cb8e9fc89 Perform typo correction for base class specifiers.
llvm-svn: 159046
2012-06-22 23:37:05 +00:00
Hal Finkel 460e94d842 Add support for the PPC isel instruction.
The isel (integer select) instruction is supported on the 440 and A2
embedded cores and on the POWER7.

llvm-svn: 159045
2012-06-22 23:10:08 +00:00
Chad Rosier 1ce3805b23 FileCheckize tests.
llvm-svn: 159044
2012-06-22 23:04:02 +00:00
Anna Zaks 26712c845e [analyzer] Teach malloc checker that initWith[Bytes|Characters}NoCopy
relinquish memory.

llvm-svn: 159043
2012-06-22 22:42:30 +00:00
Lang Hames c98ebda325 Rename fp-op fusion option (yet again) for compatibility with GCC option.
llvm-svn: 159042
2012-06-22 22:31:00 +00:00
Jakob Stoklund Olesen a127fc780a Remove ProcessImplicitDefs.h which was unused.
The ProcessImplicitDefs class can be local to its implementation file.

llvm-svn: 159041
2012-06-22 22:27:36 +00:00
Anna Zaks 301e0d6074 [analyzer] Remove a statistic - it's too expensive.
(Committed in r159038 by mistake.)

llvm-svn: 159040
2012-06-22 22:24:45 +00:00
Jakob Stoklund Olesen b033dede17 Also verify the def index for early clobbers.
llvm-svn: 159039
2012-06-22 22:23:58 +00:00
Anna Zaks 7aa3687bb6 [analyzer]scan-build: report the total number of steps analyzer performs
This would be useful to investigate performance issues.

llvm-svn: 159038
2012-06-22 22:08:12 +00:00
Anna Zaks e4b6d5e1c1 [analyzer] Fixup to r158958.
llvm-svn: 159037
2012-06-22 22:08:09 +00:00
Anna Zaks ce519153fd [analyzer] Report the cumulative number of steps the analyzer performs.
llvm-svn: 159036
2012-06-22 22:08:06 +00:00
Chad Rosier f5cdea3d79 Whitespace.
llvm-svn: 159035
2012-06-22 22:07:19 +00:00
Chandler Carruth 6e2bf8f2bb Mechanical change to sink a #ifdef guard for a platform below the
include of int_lib.h.

The purpose of this change is to make the C code conform to the pedantic
rules of C99 -- an empty translation unit is not valid. It should have
absolutely no functional impact, and changes nothing about the built
libraries.

llvm-svn: 159034
2012-06-22 21:09:22 +00:00
Chandler Carruth 321916a76b Remove extraneous semicolons outside of functions. This fixes a large
number of -pedantic warnings.

llvm-svn: 159033
2012-06-22 21:09:15 +00:00
Chandler Carruth e80a289fdc Reorder these things for clarity, and add -std=c99 to the compile flags.
llvm-svn: 159032
2012-06-22 21:09:10 +00:00
Jim Ingham bc1d7f7a6a The StepOverBreakpoint plan should only explain eStopReasonTrace. It didn't cause any other exceptional stop reason.
llvm-svn: 159031
2012-06-22 20:42:22 +00:00
Jakob Stoklund Olesen 4fa84ba8b9 Delete a boring statistic.
llvm-svn: 159030
2012-06-22 20:40:15 +00:00
Jakob Stoklund Olesen c61edda0ab Store live intervals in an IndexedMap.
It is both smaller and faster than DenseMap.

llvm-svn: 159029
2012-06-22 20:37:52 +00:00
Evan Cheng 9584799384 Forgot this patch in r159023.
llvm-svn: 159028
2012-06-22 20:30:39 +00:00
Hal Finkel 8db5547252 Revert r158679 - use case is unclear (and it increases the memory footprint).
Original commit message:
    Allow up to 64 functional units per processor itinerary.

    This patch changes the type used to hold the FU bitset from unsigned to uint64_t.
    This will be needed for some upcoming PowerPC itineraries.

llvm-svn: 159027
2012-06-22 20:27:13 +00:00
Dmitri Gribenko b31fe09b0f Mark Doxygen warnings DefaultIgnore.
llvm-svn: 159026
2012-06-22 20:19:59 +00:00
Chandler Carruth 84ba680c83 Disable the test subdirectory entirely until we get fresh CMake files
there. I didn't notice this because I had a stub that wasn't checked in
floating around in my client.

llvm-svn: 159025
2012-06-22 20:17:27 +00:00
Evan Cheng f5bd6c6510 EmitZerofill should take a 64-bit size or else it's chopping off large zero-filled global. rdar://11729134
llvm-svn: 159023
2012-06-22 20:14:46 +00:00
Jakob Stoklund Olesen 48828bb402 Fix a crash in --debug code.
Don't try to print out the live range of a physreg.

llvm-svn: 159021
2012-06-22 19:51:41 +00:00
Jakob Stoklund Olesen 48a1647c93 Don't depend on live ranges being present.
DBG_VALUE instructions could be referring to non-existing virtual
registers.

llvm-svn: 159020
2012-06-22 18:51:35 +00:00
Jakob Stoklund Olesen 8a833649e5 Simplify handleMove() a bit.
There is no need to check for physreg live ranges. They don't exist any
more.

llvm-svn: 159019
2012-06-22 18:38:57 +00:00
Jakob Stoklund Olesen 37e797fedc Stop computing physreg live ranges.
Everyone is using on-demand regunit ranges now.

llvm-svn: 159018
2012-06-22 18:20:50 +00:00
Marshall Clow 0540a39c76 Reverting makefile change wile I figure out what the heck happened
llvm-svn: 159017
2012-06-22 18:12:28 +00:00
Nuno Lopes c65221decf revert CodeGen support for the alloc_size attribute until we finish the design of a more generic metadata node
llvm-svn: 159016
2012-06-22 18:01:38 +00:00
Jakob Stoklund Olesen bbad269a3e Remove some redundant LIS->hasInterval() checks.
These functions only operate on virtual registers now, and they all have
live ranges.

llvm-svn: 159015
2012-06-22 17:49:44 +00:00
Marshall Clow 8325645dbc Added building yaml2obj to the configure+make build system
llvm-svn: 159014
2012-06-22 17:43:40 +00:00