Commit Graph

145600 Commits

Author SHA1 Message Date
David Blaikie 1dc4a3dfd6 PR15539: Record "evaluating if/elif condition" flag in the right place
The previous implementation missed the case where the elif condition was
evaluated from the context of an #ifdef that was false causing PR15539.

llvm-svn: 177345
2013-03-18 23:22:28 +00:00
Bill Wendling 008322f2b0 Update testcase for r177340.
llvm-svn: 177344
2013-03-18 23:11:54 +00:00
Jim Ingham 3793322df7 Add a comment about how to add a target for a test case.
llvm-svn: 177343
2013-03-18 23:08:30 +00:00
Jakub Staszak a0f3694aa5 Change NULL to 0.
llvm-svn: 177342
2013-03-18 23:08:01 +00:00
Jim Ingham 65423de84d Move the performance test cases into their own project.
llvm-svn: 177341
2013-03-18 23:05:00 +00:00
Bill Wendling c3cab816bb Register the flush function for each compile unit.
For each compile unit, we want to register a function that will flush that
compile unit. Otherwise, __gcov_flush() would only flush the counters within the
current compile unit, and not any outside of it.

PR15191 & <rdar://problem/13167507>

llvm-svn: 177340
2013-03-18 23:04:39 +00:00
Jakub Staszak a0e4da0af6 Remove trailing spaces.
llvm-svn: 177339
2013-03-18 23:04:30 +00:00
Hal Finkel b09680b0f7 Fix PPC unaligned 64-bit loads and stores
PPC64 supports unaligned loads and stores of 64-bit values, but
in order to use the r+i forms, the offset must be a multiple of 4.
Unfortunately, this cannot always be determined by examining the
immediate itself because it might be available only via a TOC entry.

In order to get around this issue, we additionally predicate the
selection of the r+i form on the alignment of the load or store
(forcing it to be at least 4 in order to select the r+i form).

llvm-svn: 177338
2013-03-18 23:00:58 +00:00
Bill Wendling 2428f167f7 Add some GCOV functions that register all of the __llvm_gcov_flush() functions.
The __llvm_gcov_flush() functions only work for the local compile unit. However,
when __gcov_flush() is called, the user expects all of the counters to be
flushed, not just the ones in the current compile unit.

This adds some library functions that register the flush functions. It also
defined __gcov_flush() so that loops through that list and calls the functions.

PR15191 & <rdar://problem/13167507>

llvm-svn: 177337
2013-03-18 22:59:47 +00:00
Argyrios Kyrtzidis c00f43a33f [frontend] Initialize the diagnostic client before loading an ast file.
Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377

llvm-svn: 177336
2013-03-18 22:55:24 +00:00
Richard Smith b1402ae94e Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.
llvm-svn: 177335
2013-03-18 22:52:47 +00:00
Arnold Schwaighofer ae0052f114 ARM cost model: Make some vector integer to float casts cheaper
The default logic marks them as too expensive.

For example, before this patch we estimated:
  cost of 16 for instruction:   %r = uitofp <4 x i16> %v0 to <4 x float>

While this translates to:
  vmovl.u16 q8, d16
  vcvt.f32.u32  q8, q8

All other costs are left to the values assigned by the fallback logic. Theses
costs are mostly reasonable in the sense that they get progressively more
expensive as the instruction sequences emitted get longer.

radar://13445992

llvm-svn: 177334
2013-03-18 22:47:09 +00:00
Arnold Schwaighofer 6c9c3a8b99 ARM cost model: Correct cost for some cheap float to integer conversions
Fix cost of some "cheap" cast instructions. Before this patch we used to
estimate for example:
  cost of 16 for instruction:   %r = fptoui <4 x float> %v0 to <4 x i16>

While we would emit:
  vcvt.s32.f32  q8, q8
  vmovn.i32 d16, q8
  vuzp.8  d16, d17

All other costs are left to the values assigned by the fallback logic. Theses
costs are mostly reasonable in the sense that they get progressively more
expensive as the instruction sequences emitted get longer.

radar://13434072

llvm-svn: 177333
2013-03-18 22:47:06 +00:00
Greg Clayton 7b8f738227 Code cleanup:
- don't use preprocessor macros
- use switch statements
- don't put anything in the lldb namespace, use "lldb_perf" namespace.
- Pass the action struct into each TestStep() for each step fill in
- Modify the ActionWanted class to have accessors to make the continue, next, finish, kill instead of using preproc macros

llvm-svn: 177332
2013-03-18 22:34:00 +00:00
Quentin Colombet 8fc340976d Extend global merge pass to optionally consider global constant variables.
Also add some checks to not merge globals used within landing pad instructions or marked as "used".

llvm-svn: 177331
2013-03-18 22:30:07 +00:00
Argyrios Kyrtzidis ca370b0d1f [PCH] Fix assertion hit related to enum decls inside templated funtions.
Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020

llvm-svn: 177330
2013-03-18 22:23:49 +00:00
Reed Kotler 7ee730414d This code works around what appears to be a bug in another part of clang.
I have filed http://llvm.org/bugs/show_bug.cgi?id=15538 against clang.
This code is safer anyway because "cast" assumes you really know that
it's okay to make the cast. In this case isa should not be false and
dyn_cast should not return null as far as I understand. But everything
else is valid so I did not want to revert my previous patch for attributes
mips16/nomips16 or use an llvm_unreachable here which would make a number
of our tests fail for mips.

llvm-svn: 177329
2013-03-18 22:18:00 +00:00
Bill Schmidt 45bdbe7ec0 Change test cases to handle unaligned references.
Hal Finkel recently added code to allow unaligned memory references
for PowerPC.  Two tests were temporarily modified with
-disable-ppc-unaligned to keep them from failing.  This patch adjusts
the expected code generation for the unaligned references.

llvm-svn: 177328
2013-03-18 22:12:04 +00:00
David Blaikie 3053029310 Remove unnecessary leading comment characters in lit-only file
llvm-svn: 177327
2013-03-18 22:08:16 +00:00
Jakob Stoklund Olesen a5158c8f0a Add SchedRW annotations to most of X86InstrSSE.td.
We hitch a ride with the existing OpndItins class that was used to add
instruction itinerary classes in the many multiclasses in this file.

Use the link provided by the X86FoldableSchedWrite.Folded to find the
right SchedWrite for folded loads.

llvm-svn: 177326
2013-03-18 22:01:35 +00:00
Richard Smith 38546eddf4 Add a linebreak. Linebreaks are cool.
llvm-svn: 177325
2013-03-18 21:57:52 +00:00
Richard Smith 8024ee5603 C++11 status: mark 'extended integral types' as N/A, since we don't support
any, and add a note that we cannot treat __int128 as an extended integral type.

llvm-svn: 177324
2013-03-18 21:44:56 +00:00
Jakob Stoklund Olesen e2289b78df Annotate X86 arithmetic instructions with SchedRW lists.
This new-style scheduling information is going to replace the
instruction iteneraries.

This also serves as a test case for Andy's fix in r177317.

llvm-svn: 177323
2013-03-18 21:32:39 +00:00
Manman Ren 1217112d11 Check whether a pointer is non-null (isKnownNonNull) in isKnownNonZero.
This handles the case where we have an inbounds GEP with alloca as the pointer.
This fixes the regression in PR12750 and rdar://13286434.
Note that we can also fix this by handling some GEP cases in isKnownNonNull.

llvm-svn: 177321
2013-03-18 21:23:25 +00:00
Richard Smith c2bc61b006 Bring inheriting constructor implementation up-to-date with current defect
reports, and implement implicit definition of inheriting constructors.
Remaining missing features: inheriting constructor templates, implicit
exception specifications for inheriting constructors, inheriting constructors
from dependent bases.

llvm-svn: 177320
2013-03-18 21:12:30 +00:00
Rafael Espindola 260e28d65a Centralize the recording of which tools have been constructed.
llvm-svn: 177319
2013-03-18 20:48:54 +00:00
Anna Zaks 6457ad2335 [analyzer] Warn when a ‘nil’ object is added to NSArray or NSMutableArray.
llvm-svn: 177318
2013-03-18 20:46:56 +00:00
Andrew Trick e7bac5f547 TableGen fix for the new machine model.
Properly handle cases where a group of instructions have different
SchedRW lists with the same itinerary class.
This was supposed to work, but I left in an early break.

llvm-svn: 177317
2013-03-18 20:42:25 +00:00
David Blaikie 99067af791 Include '.test' suffix in target specific lit configs that need it
Apparently my final cleanup to use a relevant suffix for these tests before
committing r176831 caused them to stop running since lit wasn't configured to
run tests with that suffix in those directories (why don't we just have a
global suffix list?). So, add the suffix to the relevant directories & fix the
test that has bitrotted over the last week due to my debug info schema changes.

llvm-svn: 177315
2013-03-18 20:31:44 +00:00
Eric Christopher 7e66bd3951 Make the fields in the diagram match the descriptive text above them.
llvm-svn: 177314
2013-03-18 20:21:47 +00:00
Sebastian Pop 97cb813c29 Correct function to decide if a SCEV can be ignored
When doing SCEV based code generation, we ignore instructions calculating values
that are fully defined by a SCEV expression. The values that are calculated by
this instructions are recalculated on demand.

This commit improves the check to verify if certain instructions can be ignored
and recalculated on demand.

llvm-svn: 177313
2013-03-18 20:21:13 +00:00
Dmitry Vyukov 4ddd37ba5b tsan: smaller memory block headers (32b->16b)
llvm-svn: 177312
2013-03-18 19:47:36 +00:00
Fariborz Jahanian e0a75d67a3 Objective-C modern translator. Don't put line info
into the pre-preprocessed file to be passed to
modern translator when compiling in no debug mode.
// rdar://13138170

llvm-svn: 177311
2013-03-18 19:41:18 +00:00
Marshall Clow 69e76f80e2 Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
llvm-svn: 177310
2013-03-18 19:34:07 +00:00
Tobias Grosser 0db0878ead ScopHelper: clang-format
llvm-svn: 177309
2013-03-18 19:19:57 +00:00
Tobias Grosser 0d1cf2b875 ScopHelper: Remove some dead code
llvm-svn: 177307
2013-03-18 19:17:07 +00:00
Sebastian Pop e039bb1fdb use the canonical IV only when it exists
llvm-svn: 177306
2013-03-18 19:09:49 +00:00
Rafael Espindola c8e3a0162b Use early returns when checking if we already constructed a tool and when
delegating to Generic_GCC::SelectTool (it already updates the tool map).

llvm-svn: 177305
2013-03-18 18:50:01 +00:00
Marshall Clow 7415c8b171 Removed raw references to _MSC_VER; now just check to see if it is defined.
llvm-svn: 177304
2013-03-18 18:20:48 +00:00
Rafael Espindola 30212ab363 Remove unused argument.
llvm-svn: 177303
2013-03-18 18:19:46 +00:00
Rafael Espindola 84b588b25c Pass an ArgList to every toolchain constructor. Remove the useIntegratedAs
argument.

llvm-svn: 177301
2013-03-18 18:10:27 +00:00
Rafael Espindola 878d2da6ab Inline ShouldUseIntegratedAssembler and move the documentation to
useIntegratedAs.

llvm-svn: 177300
2013-03-18 17:58:22 +00:00
Rafael Espindola 248e219760 Refactor a bit of duplicated code to useIntegratedAs.
llvm-svn: 177299
2013-03-18 17:52:57 +00:00
Bill Wendling 4ac1218988 Update
llvm-svn: 177298
2013-03-18 17:47:33 +00:00
Marshall Clow b56e8587af Removed raw references to __APPLE__; now just check to see if it is defined.
llvm-svn: 177297
2013-03-18 17:45:34 +00:00
Hal Finkel e8f1cf478b Fix 80-col. violations in PPCCTRLoops
llvm-svn: 177296
2013-03-18 17:40:46 +00:00
Hal Finkel 21f2a43ab4 Fix large count and negative constant count handling in PPCCTRLoops
This commit fixes an assert that would occur on loops with large constant counts
(like looping for ((uint32_t) -1) iterations on PPC64). The existing code did
not handle counts that it computed to be negative (asserting instead), but
these can be created with valid inputs.

This bug was discovered by bugpoint while I was attempting to isolate a
completely different problem.

Also, in writing test cases for the negative-count problem, I discovered that
the ori/lsi handling was broken (there was a typo which caused the logic that
was supposed to detect these pairs and extract the iteration count to always
fail). This has now also been corrected (and is covered by one of the new test
cases).

llvm-svn: 177295
2013-03-18 17:40:44 +00:00
Hal Finkel 12337e4e7d Cleanup initial-value constants in PPCCTRLoops
Because the initial-value constants had not been added to the list
of instructions considered for DCE the resulting code had redundant
constant-materialization instructions.

llvm-svn: 177294
2013-03-18 17:40:27 +00:00
Rafael Espindola 88b55ead59 Remove unused argument.
llvm-svn: 177293
2013-03-18 17:25:58 +00:00
Dmitry Vyukov 61ce9560d4 tsan: add support for idle threads
llvm-svn: 177292
2013-03-18 17:21:15 +00:00