Commit Graph

174108 Commits

Author SHA1 Message Date
Richard Smith a90ee35a8e PR19713: Don't warn on unused static inline functions, even if the 'inline' was
implied by 'constexpr'.

llvm-svn: 208511
2014-05-11 21:25:24 +00:00
Matt Arsenault 46013d903f Fix return before else
llvm-svn: 208510
2014-05-11 21:24:41 +00:00
Hal Finkel 0d8db46799 [PowerPC] Add global named register support
Support for the intrinsics that read from and write to global named registers
is added for r1, r2 and r13 (depending on the subtarget).

llvm-svn: 208509
2014-05-11 19:29:11 +00:00
Hal Finkel f0e086a0bc Pass the value type to TLI::getRegisterByName
We must validate the value type in TLI::getRegisterByName, because if we
don't and the wrong type was used with the IR intrinsic, then we'll assert
(because we won't be able to find a valid register class with which to
construct the requested copy operation). For PPC64, additionally, the type
information is necessary to decide between the 64-bit register and the 32-bit
subregister.

No functionality change.

llvm-svn: 208508
2014-05-11 19:29:07 +00:00
Hal Finkel b33e9872a0 Add 'override' to getRegisterByName in *ISelLowering.h
No functionality change intended.

llvm-svn: 208507
2014-05-11 19:28:55 +00:00
David Blaikie 9576766be9 DebugInfo: Include lexical scopes in inlined subroutines.
llvm-svn: 208506
2014-05-11 18:12:17 +00:00
Nico Weber a04d5f8d8f Driver: Don't leak the -Xarch argument when its use is incorrect.
(LLVM's lib/Option looks like it might appreciate being hit with the
std::unique_ptr stick.)

llvm-svn: 208505
2014-05-11 17:27:13 +00:00
David Blaikie 866c87f07b DebugInfo: Simplify/correct test for correct constant emission when dealing with derived types.
This test was using the inliner and other optimizations to test a case
that's actually a bug anyway. Bug and possible fix/discussion described
here ( http://reviews.llvm.org/D3714 ).

But the functionality that was implemented along with this test is still
desired, so simplify the test to verify a more obvious/less wrong case
that the functionality addressed: looking through const sugar to the
underlying type when emitting a constant (so the constant is emitted as
signed/unsigned as appropriate depending on the signedness of the
underlying type).

llvm-svn: 208504
2014-05-11 17:25:50 +00:00
Nico Weber ce5528ac91 c-index-test: Don't leak diagnostic category text.
llvm-svn: 208503
2014-05-11 17:16:59 +00:00
David Blaikie e0f14743c0 DwarfUnit: Make explicit a limitation/bug in enumeration constant emission.
Filed as PR19712, LLVM fails to detect the right type of an enum
constant when a frontend does not provide an underlying type for the
enumeration type.

llvm-svn: 208502
2014-05-11 17:04:05 +00:00
Hal Finkel c4c6c87666 [PowerPC] On PPC32, 128-bit shifts might be runtime calls
The counter-loops formation pass needs to know what operations might be
function calls (because they can't appear in counter-based loops). On PPC32,
128-bit shifts might be runtime calls (even though you can't use __int128 on
PPC32, it seems that SROA might form them).

Fixes PR19709.

llvm-svn: 208501
2014-05-11 16:23:29 +00:00
David Blaikie 60cae1ba49 DwarfUnit: Pick a winner between isTypeSigned and isUnsignedDIType.
And the winner by a nose is isUnsignedDIType, for no particular reason.

These two functions were just complements of each other and used in very
related code, so refactor callers to just use one of them.

llvm-svn: 208500
2014-05-11 16:08:41 +00:00
Alp Toker 1b13dab608 Parameter/argument terminology fixes
llvm-svn: 208499
2014-05-11 16:06:11 +00:00
Alp Toker 4284c6e7a4 Consolidate single void paramter checking
Also correct argument/parameter terminology.

No change in functionality.

llvm-svn: 208498
2014-05-11 16:05:55 +00:00
Benjamin Kramer 53156af57c Another try at making MSVC happy again.
llvm-svn: 208497
2014-05-11 16:03:08 +00:00
David Blaikie c0a2841e2f DwarfUnit: Factor out calling isUnsignedDIType into a utility function so each caller of emitConstantValue doesn't have to call it separately.
llvm-svn: 208496
2014-05-11 15:56:59 +00:00
David Blaikie c05c8f483b DwarfUnit: Share common constant value emission between APInts of small (<= 64 bit) and MCOperand immediates.
Doesn't seem a good reason to duplicate this code (it was more literally
duplicated prior to r208494, and while the dataN code /does/ actually
fire in this case, it doesn't seem necessary (and the DWARF standard
recommends using udata/sdata pervasively instead of dataN, so as to
indicate signedness of the values))

llvm-svn: 208495
2014-05-11 15:47:39 +00:00
David Blaikie 958647c36d DebugInfo: Simplify constant value emission.
This code looks to have become dead at some time in the past. I tried to
reproduce cases where LLVM would emit constants with dataN, but could
not. Upon inspection it seems the code doesn't do that anymore - the
only time a size is provided by isTypeSigned is when the type is signed,
and in those cases we use sdata. dataN is only used for unsigned types
and isTypeSigned doesn't provide a value for sizeInBits in that case.

Remove the dead cases/size plumbing.

llvm-svn: 208494
2014-05-11 15:06:20 +00:00
Benjamin Kramer 062bf473c1 Put back raw_ostream.h include.
Some configurations of MSVC get horribly confused by the forward declaration
and explode.

llvm-svn: 208493
2014-05-11 10:41:20 +00:00
Benjamin Kramer 1fef64214c SLPVectorizer: Instead of just performing CSE on dead blocks ignore them completely.
Turns out that there is a very cheap way of testing whether a block is dead,
just look it up in the DomTree. We have to do this anyways so just ignore
unreachable blocks before sorting by domination. This restores a proper
ordering for std::stable_sort when dead code is present.

Covered by existing tests & buildbots running in STL debug mode (MSVC).

llvm-svn: 208492
2014-05-11 10:28:58 +00:00
Benjamin Kramer b7ee689f91 Silence warning in Release builds. This function is only used in an assert.
llvm-svn: 208491
2014-05-11 09:31:47 +00:00
Simon Atanasyan 20b043b24c [Mips] Update test case expectations to reflect changes in the
llvm-readobj output format.

llvm-svn: 208490
2014-05-11 08:54:30 +00:00
Simon Atanasyan ca8b562709 [llvm-readobj] Print values of FLAGS and MIPS_FLAGS dynamic table tags
in a human readable form.

llvm-svn: 208489
2014-05-11 08:48:09 +00:00
Serge Pavlov 9ef66a8266 Reorder shuffle and binary operation.
This patch enables transformations:

    BinOp(shuffle(v1), shuffle(v2)) -> shuffle(BinOp(v1, v2))
    BinOp(shuffle(v1), const1) -> shuffle(BinOp, const2)

They allow to eliminate extra shuffles in some cases.

Differential Revision: http://reviews.llvm.org/D3525

llvm-svn: 208488
2014-05-11 08:46:12 +00:00
Filipe Cabecinhas 0e3d1cb5d6 Fixed a bug when lowering build_vector (PR19694)
When lowering build_vector to an insertps, we would still lower it, even
if the source vectors weren't v4x32. This would break on avx if the source
was a v8x32. We now check the type of the source vectors.

llvm-svn: 208487
2014-05-11 08:12:56 +00:00
Saleem Abdulrasool 8ab3e83efa CodeGen: support dll{ex,im}port on WoA
Add ARM support for dllexport and dllimport attributes.  This is a relatively
conservative change.  The alternative is to entirely drop the architecture
requirement.  The dllimport and dllexport attributes are not restricted to any
architecture, simply to platforms that support this attribute (currently
Windows).

llvm-svn: 208486
2014-05-11 01:31:57 +00:00
Nico Weber e8e53116f8 Wrap at 80 columns. No code change.
llvm-svn: 208485
2014-05-11 01:04:02 +00:00
Nico Weber 7aeab6022f Follow-up to r208481: Free all default arguments, not just the first one.
Also add test coverage for this case.  Found by Richard Smith!

llvm-svn: 208484
2014-05-11 00:28:16 +00:00
Nico Weber 3fddae75c7 Don't leak CXStrings for replacement fix-its in c-index-test.
The loop body used to contain a switch statement; it looks like r96685 replaced
that with an if/else if/else but accidentally left one of the three break
statements from the switch behind, skipping the clang_disposeString() call
for replacements (and the rest of the loop too, which apparently doesn't make
a differences for the test cases we have).

r96685: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100215/027754.html

This too might possibly the last leak in clang (PR19521).

llvm-svn: 208483
2014-05-10 23:56:43 +00:00
Benjamin Kramer ef316ee8df Try to bring the 32 bit buildbots back to life.
llvm-svn: 208482
2014-05-10 20:57:56 +00:00
Nico Weber e2b5e40203 Don't leak default arg tokens on invalid destructors or conversion functions.
Fixes PR19689, and possibly the last leak in clang (PR19521). PR19689 contains
a few suggestions on how to make the default argument token code a bit more
solid, these changes can possibly be landed in follow-ups.

llvm-svn: 208481
2014-05-10 19:23:28 +00:00
Vincent Lejeune 29c0c210fc R600/SI: Fold fabs/fneg into src input modifier
llvm-svn: 208480
2014-05-10 19:18:39 +00:00
Vincent Lejeune 94af31fbe8 R600/SI: Prettier display of input modifiers
llvm-svn: 208479
2014-05-10 19:18:33 +00:00
Vincent Lejeune 79a5834647 R600/SI: Use pseudo instruction for fabs/clamp/fneg
llvm-svn: 208478
2014-05-10 19:18:25 +00:00
Nico Weber cf596d8fa8 Add test coverage for invalid conversion functions with default args.
This currently leaks memory (PR19689) but wasn't covered by tests, so LSan
couldn't find it.

llvm-svn: 208477
2014-05-10 19:15:24 +00:00
Benjamin Kramer 8cff45aa20 SCEV: Use range-based for loop and fold variable into assert.
llvm-svn: 208476
2014-05-10 17:47:18 +00:00
Nico Weber 77c76c54fc Wrap to 80 columns. No behavior change.
llvm-svn: 208475
2014-05-10 17:43:15 +00:00
Fariborz Jahanian c70a54366e Objective-C ARC. Add support for toll-free bridge
type ,and bridge attribute, checking with static_cast. 
// rdar://16756639

llvm-svn: 208474
2014-05-10 17:40:11 +00:00
Benjamin Kramer e6f743f9ab Analyzer: Make helper function static.
llvm-svn: 208473
2014-05-10 17:13:34 +00:00
Jim Cownie 18d8473f18 Add testsuite from OpenUH
llvm-svn: 208472
2014-05-10 17:02:09 +00:00
Benjamin Kramer 281f9d0e97 Update for Clang API change and move ClangTidyDiagnosticRenderer into an anonymous namespace while there.
llvm-svn: 208471
2014-05-10 16:32:07 +00:00
Benjamin Kramer f3ca269839 Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.
Required pulling LambdaExpr::Capture into its own header.
No functionality change.

llvm-svn: 208470
2014-05-10 16:31:55 +00:00
Tim Northover 55b3e22927 ARM64: fix SELECT_CC lowering in absence of NaNs.
We were swapping the true & false results while testing for FMAX/FMIN,
but not putting them back to the original state if the later checks
failed.

Should fix PR19700.

llvm-svn: 208469
2014-05-10 07:37:50 +00:00
David Blaikie 9c8821bbef Add FIXME describing the limitation of using column info to disambiguate inlining.
Also tidy up, simplify, and extend the test coverage to demonstrate the
limitations. This test should now fail if the bugs are fixed (&
hopefully whoever ends up in this situation sees the FIXMEs and realizes
that the test needs to be updated to positively test their change that
has fixed some or all of these issues).

I do wonder whether I could demonstrate breakage without a macro here,
but any way I slice it I can't think of a way to get two calls to the
same function on the same line/column in non-macro C++ - implicit
conversions happen at the same location as an explicit function, but
you'd never get an implicit conversion on the result of an explicit call
to the same implicit conversion operator (since the value is already
converted to the desired result)...

llvm-svn: 208468
2014-05-10 02:44:57 +00:00
Richard Smith d7af8a334c Stop all the Decl classes poking at Redeclarable's data member directly, and make getNextRedeclaration follow the pattern of its friends getPreviousDecl and getMostRecentDecl.
llvm-svn: 208467
2014-05-10 01:17:36 +00:00
Logan Chien dc65ab4cef Implement ARM EHABI exception handling.
This commit implements the ARM zero-cost exception handling
support for libc++abi.

llvm-svn: 208466
2014-05-10 00:42:10 +00:00
Logan Chien cc24fc546b Check exception specification with __cplusplus.
To allow the compilation with gcc, we can't use the
__has_feature(cxx_noexcept) to detect the default destructor
exception specification, which is noexcept(true) by default
in C++11.  We should use __cplusplus >= 201103L instead.

llvm-svn: 208465
2014-05-10 00:40:54 +00:00
Duncan P. N. Exon Smith 59ad79601b InstrProf: Remove redundant declaration
llvm-svn: 208464
2014-05-10 00:22:58 +00:00
Kevin Enderby 6abc2e58ac Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.
The implementation might be better to have a method is64Bit() in the class
SymbolicFile instead of having the static routine isSymbolList64Bit() in
llvm-nm.cpp .  But this is very much in the sprit of isObject() and
getNMTypeChar() in llvm-nm.cpp that has a series of if else statements
based on the specific class of the SymbolicFile.  I can update this if
folks would like.

Also the tests were updated to be explicit about checking the address for
64-bits or 32-bits from object files.

llvm-svn: 208463
2014-05-09 23:57:49 +00:00
Duncan P. N. Exon Smith b6bd2f6cf7 InstrProf: Pacify buildbots after r208460
llvm-svn: 208462
2014-05-09 23:47:49 +00:00