Commit Graph

179448 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith 3f0fc7bca9 Bitcode: Correctly compare a Use against itself
Fix the sort of expected order in the reader to correctly return `false`
when comparing a `Use` against itself.

This was caught by test/Bitcode/binaryIntInstructions.3.2.ll, so I'm
adding a `RUN` line using `llvm-uselistorder` for every test in
`test/Bitcode` that passes.

A few tests still fail, so I'll investigate those next.

This is part of PR5680.

llvm-svn: 214157
2014-07-29 01:13:56 +00:00
Duncan P. N. Exon Smith fee1f5013c Fix line-endings, NFC
A follow-up commit is adding a RUN line to each of these tests, so fix
the line endings first.  This is a whitespace-only change.

llvm-svn: 214156
2014-07-29 01:10:57 +00:00
Duncan P. N. Exon Smith 78141cef2c IR: Augment debug statements for use-list order
llvm-svn: 214155
2014-07-29 01:09:46 +00:00
Richard Smith 049fcd8c64 [modules] Add testcase for a bug reduced from a selfhost issue. This bug was
never present in Clang trunk, but was present in some of my development work,
and it seems like a useful test to have.

llvm-svn: 214154
2014-07-29 00:58:01 +00:00
Richard Smith 08b9515f45 Revert accidentally-committed files in r214151.
llvm-svn: 214152
2014-07-29 00:54:09 +00:00
Richard Smith 05ad411aa2 [modules] Add missing #include, found by modules build. We need a class
definition in order to apply isa<...>.

llvm-svn: 214151
2014-07-29 00:51:47 +00:00
Rafael Espindola 5466a0fbc4 Delete dead code.
It was added 12 years ago, but never used (and in the case of sort, never
implemented).

llvm-svn: 214150
2014-07-29 00:38:55 +00:00
Alexey Samsonov 8b9d18e4fe [UBSan] Try to enable pipefail in UBSan lit tests to make them behave more predictably
llvm-svn: 214149
2014-07-29 00:30:01 +00:00
Bob Wilson 0874e538aa Fix up handling of ARM options for controlling strict alignment.
The -mstrict-align option was originally added in r167619 as a target-
independent option. It was then changed in r167623 to be implemented with an
ARM-specific backend option, even though the code remained in the
target-independent Clang::ConstructJob function. This means that if you used
the -mstrict-align option with a non-ARM target, you would still get the
-arm-strict-align option getting passed to the backend, which was harmless
but gross. The driver option was then replaced by the GCC-compatible
-m[no-]unaligned-access option (r189175) and modified to work with AArch64
(r208075). However, in the process, the help text for -mstrict-align was
incorrectly changed to show it as only being supported for AArch64. Even worse,
the logic for handling these options together with -mkernel was wrong for
AArch64, where -mkernel does not currently imply strict alignment.

This patch fixes up all of those things. Besides the obvious change to the
option help text, it moves the logic into the ARM and AArch64-specific parts
of the driver, so that the option will be correctly ignored for non-ARM
targets. <rdar://problem/17823697>

llvm-svn: 214148
2014-07-29 00:23:18 +00:00
Matt Arsenault 57e74d2010 Fix typos / grammar.
llvm-svn: 214147
2014-07-29 00:02:40 +00:00
Matt Arsenault 60bd28cefd Fix header including itself
llvm-svn: 214146
2014-07-29 00:02:37 +00:00
Nick Kledzik 3fc5ffecf8 [mach-o] fix non-debug warnings
llvm-svn: 214145
2014-07-28 23:40:26 +00:00
Duncan P. N. Exon Smith ff3caa5a3e llvm-uselistorder: Add -num-shuffles option
llvm-svn: 214144
2014-07-28 23:25:21 +00:00
Kevin Enderby 49b4f53cad Tweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
to just print the symbol name.  So it matches darwin’s nm(1) -u option.

llvm-svn: 214143
2014-07-28 23:17:38 +00:00
Manman Ren 4dbffad804 Clean up testing cases.
llvm-svn: 214142
2014-07-28 23:16:05 +00:00
Reid Kleckner 4db3256aec Add a location to MS inline asm blobs
This isn't nearly as elaborate as the GCC inline asm which emits an
array of source locations, but it's very, very hard to trigger backend
diagnostics in MS inline asm because we parse it up front with good
source information, unlike GCC inline asm.

Currently I can trigger a "inline assembly requires more registers than
available" diagnostic with this code:

  void foo();
  void bar() {
    __asm pusha
    __asm call foo
    __asm popa
  }

However, if I committed that as a test case, I would have to remove it
once I fix PR20052.

llvm-svn: 214141
2014-07-28 23:12:59 +00:00
Nick Kledzik 54fd4e5fcb [mach-o] Implement interworking between thumb and arm code
All iOS arm processor support switching between arm and thumb mode at call sites
by using the BLX instruction (instead of BL).  But the compiler does not know
the implementation mode for extern functions, so the linker must update BL/BLX
instructions to match what is linked is actually linked together.  In addition,
pointers to functions (such as vtables) must have the low bit set if the target
of the pointer is a thumb mode function.

llvm-svn: 214140
2014-07-28 23:06:09 +00:00
Manman Ren bd1628a595 [Debug Info] unique MDNodes in the enum types of each compile unit.
The enum types array by design contains pointers to MDNodes rather than DIRefs.
Unique them when handling the enum types in DwarfDebug.

rdar://17628609

llvm-svn: 214139
2014-07-28 23:04:20 +00:00
Todd Fiala ef7150925f Fixup TestStepNoDebug to cleanup properly on shutdown.
This was causing core dumps on MacOSX and was not properly
cleaning up the state of the inferior before exiting.

The test was overriding def tearDown(), but failed to
call the base class after doing its own cleanup.  This
essentially eliminated normal clean-up activity.

llvm-svn: 214138
2014-07-28 22:53:49 +00:00
Manman Ren bd3c17cc86 Remove extra ; in testing case.
llvm-svn: 214137
2014-07-28 22:46:46 +00:00
Richard Smith 6fe48630c2 Remove a nonsense friend declaration.
llvm-svn: 214136
2014-07-28 22:42:21 +00:00
Duncan P. N. Exon Smith f849ace2ab IR: Optimize size of use-list order shuffle vectors
Since we're storing lots of these, save two-pointers per vector with a
custom type rather than using the relatively heavy `SmallVector`.

Part of PR5680.

llvm-svn: 214135
2014-07-28 22:41:50 +00:00
Rui Ueyama 7385120d65 [PECOFF] Fix failing test.
This should be covered by the Driver's unit tests.

llvm-svn: 214134
2014-07-28 22:31:37 +00:00
Manman Ren 67f005e3b2 [Debug Info] add DISubroutineType and its creation takes DITypeArray.
This is the last patch to unique the type array of a subroutine type.
This is the paired commit with llvm r214132.

llvm-svn: 214133
2014-07-28 22:24:34 +00:00
Manman Ren f8a1967c8c [Debug Info] add DISubroutineType and its creation takes DITypeArray.
DITypeArray is an array of DITypeRef, at its creation, we will create
DITypeRef (i.e use the identifier if the type node has an identifier).

This is the last patch to unique the type array of a subroutine type.

rdar://17628609

llvm-svn: 214132
2014-07-28 22:24:06 +00:00
Hans Wennborg 831f05802e Update LLVM version: 3.5 => 3.6
We branched 3.5, it's now time to work on 3.6.

This is Sylvestre's patch from [1] plus regenerated configure
file by me, and minus the release notes reset, which Sean
pointed out [2] should happen later.

 1. http://reviews.llvm.org/D4660
 2. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140721/111137.html

llvm-svn: 214131
2014-07-28 22:10:52 +00:00
Alexey Samsonov 4462ec6c02 Exclude ASM from CompilerRT languages as an attempt to fix CMake failure in standalone mode
llvm-svn: 214130
2014-07-28 22:04:19 +00:00
Eric Christopher 14b76d5694 Regenerate autoconf, previous updates to the configury haven't
been updating configure.

llvm-svn: 214129
2014-07-28 22:00:44 +00:00
Duncan P. N. Exon Smith 3a7fb63c49 llvm-uselistorder: Get it building in configure+make after r214125
Somehow this wasn't being built before (only noticed now since the test
was XFAILed).

llvm-svn: 214128
2014-07-28 21:47:40 +00:00
Duncan P. N. Exon Smith 1f66c856b5 Bitcode: Serialize (and recover) use-list order
Predict and serialize use-list order in bitcode.  This makes the option
`-preserve-bc-use-list-order` work *most* of the time, but this is still
experimental.

  - Builds a full value-table up front in the writer, sets up a list of
    use-list orders to write out, and discards the table.  This is a
    simpler first step than determining the order from the various
    overlapping IDs of values on-the-fly.

  - The shuffles stored in the use-list order list have an unnecessarily
    large memory footprint.

  - `blockaddress` expressions cause functions to be materialized
    out-of-order.  For now I've ignored this problem, so use-list orders
    will be wrong for constants used by functions that have block
    addresses taken.  There are a couple of ways to fix this, but I
    don't have a concrete plan yet.

  - When materializing functions lazily, the use-lists for constants
    will not be correct.  This use case is out of scope: what should the
    use-list order be, if it's incomplete?

This is part of PR5680.

llvm-svn: 214125
2014-07-28 21:19:41 +00:00
Richard Smith f59b735a80 [modules] PR20475: merging support for alias template declarations.
llvm-svn: 214124
2014-07-28 21:16:37 +00:00
Duncan P. N. Exon Smith 2101a7fbcf llvm-uselistorder: Add -save-temps option
This is part of PR5680.

llvm-svn: 214123
2014-07-28 21:12:19 +00:00
Duncan P. N. Exon Smith 75d94849b4 llvm-uselistorder: Check the correct flag for assembly
This is part of PR5680.

llvm-svn: 214122
2014-07-28 21:12:17 +00:00
Duncan P. N. Exon Smith b5806889f4 IR: Expose Module::rbegin() and rend()
A follow-up commit for PR5680 needs to visit functions in reverse order.
Expose iterators to allow that.

llvm-svn: 214121
2014-07-28 21:09:32 +00:00
Joerg Sonnenberger 3d9478cf3a Change __INTx_TYPE__ to be always signed. This changes the value for
char-based types from "char" to "signed char". Adjust stdint.h to use
__INTx_TYPE__ directly without prefixing it with signed and to use
__UINTx_TYPE__ for unsigned ones.

The value of __INTx_TYPE__ now matches GCC.

llvm-svn: 214119
2014-07-28 21:06:22 +00:00
Lang Hames 1f638440c6 [MCJIT] Remove extraneous parentheses in test case.
llvm-svn: 214117
2014-07-28 21:00:48 +00:00
Rafael Espindola 99298fc36a Test the linker plugin handling of llvm.used.
llvm-svn: 214116
2014-07-28 20:42:29 +00:00
Manman Ren 1a125c95de [Debug Info] add a template class DITypedArray.
Typedef DIArray to DITypedArray<DIDescriptor>. Also typedef DITypeArray as
DITypedArray<DITypeRef>.

This is the third of a series of patches to handle type uniqueing of the
type array for a subroutine type.

This commit should have no functionality change.

llvm-svn: 214115
2014-07-28 19:33:20 +00:00
Alexey Samsonov 9d7323eca3 Fix linking with just-built libc++abi (added in r214037).
Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure
that linker is able to locate just-built libc++abi in the build tree,
instead of relying on "-lc++abi" linker flag.

llvm-svn: 214114
2014-07-28 19:25:44 +00:00
Manman Ren 51289892d2 [Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
This is the paired commit with llvm r214112.

llvm-svn: 214113
2014-07-28 19:14:41 +00:00
Manman Ren ab8ffbaaee [Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
This is the second of a series of patches to handle type uniqueing of the
type array for a subroutine type.

For vector and array types, getElements returns the array of subranges, so it
is a better name than getTypeArray. Even for class, struct and enum types,
getElements returns the members, which can be subprograms.

setArrays can set up to two arrays, the second is the templates.

This commit should have no functionality change.

llvm-svn: 214112
2014-07-28 19:14:13 +00:00
Manman Ren bf696e3930 [Debug Info] replace DIUnspecifiedParameter with DITrivialType.
This is the first of a series of patches to handle type uniqueing of the
type array for a subroutine type.

This commit makes sure unspecified_parameter is a DIType to enable converting
the type array for a subroutine type to an array of DITypes.

This commit should have no functionality change. With this commit, we may
change unspecified type to be a DITrivialType instead of a DIType.

llvm-svn: 214111
2014-07-28 18:52:30 +00:00
Kaelyn Takata b04846b4cd Add another keyword-selection flag to CorrectionCandidateCallback.
The new flag, WantFunctionLikeCasts, covers a subset of the keywords
covered by WantTypeSpecifiers that can be used in casts that look like
function calls, e.g. "return long(5);", while excluding the keywords
like "enum" and "const" that would be included when WantTypeSpecifiers
is true but cannot be used in something that looks like a function call.

llvm-svn: 214109
2014-07-28 18:14:02 +00:00
Matt Arsenault 2b252ecf6b R600: Modernize test
llvm-svn: 214108
2014-07-28 18:06:08 +00:00
Alex Lorenz 2b5d03ae94 llvm-cov: move the gcov code into a separate file.
The gcov compatible code is moved to its own file and
llvm-cov is updated to be a wrapper that always calls
the gcov main function.

llvm-svn: 214107
2014-07-28 18:03:51 +00:00
Matt Arsenault b9f46eeff1 R600/SI: Fix return type for isMIMG / isSMRD
All the others use bool, so these should too.

llvm-svn: 214106
2014-07-28 17:59:38 +00:00
Chandler Carruth b143274ad0 [SDAG] Add DEBUG logging to the legalizer, fixing a "bug" found by
inspection in the proccess, and shuffle the logging in the DAG combiner
around a bit.

With this it is much easier to follow what the legalizer is doing. It
should even accurately present most of the strange legalization
operations where a single node is replaced by multiple nodes, etc. There
is still some information lost (we log SDNodes not SDValues so we don't
log which result is used for which thing), but I think this is much
closer to a usable system. Notably, this will make it *much* more
apparant when legalization is actually happening inside the combiner, or
when there is a cycle caused by interactions of the legalizer and the
combiner.

The "bug" I fixed here I'm not sure is remotely possible to trigger. We
were only adding one of the nodes in a replacement to the updated set
rather than all of the nodes in the replacement. Realistically, the
worst result of this are nodes not getting back onto the worklist in the
DAG combiner. I doubt it is possible to trigger this today, and
I certainly don't have any ideas about how, but this at least brings the
code into alignment with the principled operation of the routine.

llvm-svn: 214105
2014-07-28 17:55:07 +00:00
Matt Arsenault 46645fa102 R600/SI: Implement getOptimalMemOpType
The default guess uses i32. This needs an address space argument
to really do the right thing in all cases.

llvm-svn: 214104
2014-07-28 17:49:26 +00:00
Reid Kleckner 07bdf7f720 Fix MSVC warnings about falling off the end of a non-void function
llvm-svn: 214103
2014-07-28 17:48:12 +00:00
Rafael Espindola 6dca51502a Add tests for the various emit-llvm plugin options.
llvm-svn: 214102
2014-07-28 17:37:25 +00:00