Commit Graph

171900 Commits

Author SHA1 Message Date
Jim Grosbach e2e1c35566 SDNode: Add uses() iterator_range convenience methods.
llvm-svn: 206005
2014-04-11 00:27:17 +00:00
Warren Hunt 29a2b955fb [MS-ABI] Update virtual base padding rules to match MSVC 10+
In version 9 (VS2010) (and prior)? versions of msvc, if the last field 
in a record was a bitfield padding equal to the size of the storage 
class of that bitfield was added before each vbase and vtordisp.  This 
patch removes that feature from clang and updates the lit tests to 
reflect it. 

llvm-svn: 206004
2014-04-11 00:14:09 +00:00
David Blaikie 9ec3212841 Remove lazy-initialization of section caches in MCContext
This seems to have been a cargo-culted habit from the very first such
cache which didn't have any specific justification (but might've been a
layering constraint at the time).

llvm-svn: 206003
2014-04-10 23:55:11 +00:00
Duncan P. N. Exon Smith 4a2f5ae8d5 InstrProf: Rename Decl parameters from S to D
No functionality change.

<rdar://problem/16435801>

llvm-svn: 206002
2014-04-10 23:37:36 +00:00
Duncan P. N. Exon Smith e9624291b1 InstrProf: Read unsigned numbers with strtoul and strtoull
Fixes a bug where unsigned numbers are read using strtol and strtoll.

I don't have a testcase because this bug is effectively unobservable
right now.  To expose the problem in the hash, we would need a function
with greater than INT64_MAX counters, which we don't handle anyway.  To
expose the problem in the function count, we'd need a function with
greater than INT32_MAX counters; this is theoretically observable, but
it isn't a practical testcase to check in.

An upcoming commit changes the hash to be non-trivial, so we'll get some
coverage eventually.

<rdar://problem/16435801>

llvm-svn: 206001
2014-04-10 23:37:34 +00:00
Warren Hunt bb9c3c33e9 [MS-ABI] Fix to vbptr injection site calculation.
The vbptr is injected after the last non-virtual base lexographically 
rather than the last non-virtual base in layout order.  Test case 
included.  Also, some line ending fixes.

llvm-svn: 206000
2014-04-10 23:23:34 +00:00
Adrian Prantl 42d71b9906 Debug info: (Bugfix) Make sure artificial functions like _GLOBAL__I_a
are not associated with any source lines.

Previously, if the Location of a Decl was empty, EmitFunctionStart would
just keep using CurLoc, which would sometimes be correct (e.g., thunks)
but in other cases would just point to a hilariously random location.

This patch fixes this by completely eliminating all uses of CurLoc from
EmitFunctionStart and rather have clients explicitly pass in a
SourceLocation for the function header and the function body.

rdar://problem/14985269

llvm-svn: 205999
2014-04-10 23:21:53 +00:00
Reid Kleckner fb873af67e Update Clang for LLVM split stack API changes in r205997
Patch by Alex Crichton!

llvm-svn: 205998
2014-04-10 22:59:13 +00:00
Reid Kleckner 9c6582129a Move the segmented stack switch to a function attribute
This removes the -segmented-stacks command line flag in favor of a
per-function "split-stack" attribute.

Patch by Luqman Aden and Alex Crichton!

llvm-svn: 205997
2014-04-10 22:58:43 +00:00
Josh Magee 79ae600818 [stack protector] Refactor and clean-up test. No functionality change.
Refactored stack-protector.ll to use new-style function attributes everywhere
and eliminated unnecessary attributes.

This cleanup is in preparation for an upcoming test change.

llvm-svn: 205996
2014-04-10 22:47:27 +00:00
Louis Gerbarg abf48407bf Test commit.
Update contact information in CREDITS.TXT.

llvm-svn: 205995
2014-04-10 22:25:51 +00:00
Warren Hunt 5d9eebfec6 [MS-ABI] Fixed __declspec(align()) on bitfields under #pragma pack.
When __declspec(align()) is applied to a bitfield it affects the 
alignment rather than the required alignment of the struct.  The major 
feature that this patch adds is that the alignment of the structure 
obeys the alignment of __declspec(align()) from the bitfield over the 
value specified in pragma pack.

Test cases are included.
The patch also includes some small cleanups in recordlayoutbuilder and 
some cleanups to some lit tests, including line endings (but no 
functionality change to lit tests)

llvm-svn: 205994
2014-04-10 22:15:18 +00:00
David Blaikie 1ecafa8808 Simplify make_range by using move semantics
Move the iterators into the range the same way the range's ctor moves
them into the members.

Also remove some redundant top level parens in the return statement.

llvm-svn: 205993
2014-04-10 22:03:48 +00:00
Jim Grosbach 577e921344 [ARM64,C++11]: Range'ify loops in InstrInfo.
llvm-svn: 205992
2014-04-10 22:00:18 +00:00
Kaelyn Takata f7c12fcd83 Remove the use of "%e" as it is not a valid expansion like "%t".
llvm-svn: 205991
2014-04-10 21:55:58 +00:00
David Blaikie 8019bf815d Reimplement debug info compression by compressing the whole section, rather than a fragment.
To support compressing the debug_line section that contains multiple
fragments (due, I believe, to variation in choices of line table
encoding depending on the size of instruction ranges in the actual
program code) we needed to support compressing multiple MCFragments in a
single pass.

This patch implements that behavior by mutating the post-relaxed and
relocated section to be the compressed form of its former self,
including renaming the section.

This is a more flexible (and less invasive, to a degree) implementation
that will allow for other features such as "use compression only if it's
smaller than the uncompressed data".

Compressing debug_frame would be a possible further extension to this
work, but I've left it for now. The hurdle there is alignment sections -
which might require going as far as to refactor
MCAssembler.cpp:writeFragment to handle writing to a byte buffer or an
MCObjectWriter (there's already a virtual call there, so it shouldn't
add substantial compile-time cost) which could in turn involve
refactoring MCAsmBackend::writeNopData to use that same abstraction...
which involves touching all the backends. This would remove the limited
handling of fragment writing seen in
ELFObjectWriter.cpp:getUncompressedData which would be nice - but it's
more invasive.

I did discover that I (perhaps obviously) don't need to handle
relocations when I rewrite the fragments - since the relocations have
already been applied and computed (and stored into
ELFObjectWriter::Relocations) by this stage (necessarily, because we
need to have written any immediate values or assembly-time relocations
into the data already before we compress it, which we have). The test
case doesn't necessarily cover that in detail - I can add more test
coverage if that's preferred.

llvm-svn: 205990
2014-04-10 21:53:53 +00:00
David Blaikie 4d3b043542 Revert debug info compression support.
To support compression for debug_line and debug_frame a different
approach is required. To simplify review, revert the old implementation
and XFAIL the test case. New implementation to follow shortly.

Reverts r205059 and r204958.

llvm-svn: 205989
2014-04-10 21:53:47 +00:00
Jim Grosbach 8a0c50e5a9 [ARM64,C++11]: Range'ify loops in the conditional-compare pass.
llvm-svn: 205988
2014-04-10 21:49:24 +00:00
Jim Grosbach 395fd0489c iterator_range: Add an llvm::make_range() helper method.
Convenience wrapper to make dealing with sub-ranges easier. Like the
iterator_range<> itself, if/when this sort of thing gets standards
blessing, it will be replaced by the official version.

llvm-svn: 205987
2014-04-10 21:49:22 +00:00
Kevin Enderby 488f20b64e For the ARM integrated assembler add checking of the
alignments on vld/vst instructions.  And report errors for
alignments that are not supported.

While this is a large diff and an big test case, the changes
are very straight forward.  But pretty much had to touch
all vld/vst instructions changing the addrmode to one of the
new ones that where added will do the proper checking for
the specific instruction.

FYI, re-committing this with a tweak so MemoryOp's default
constructor is trivial and will work with MSVC 2012. Thanks
to Reid Kleckner and Jim Grosbach for help with the tweak.

rdar://11312406

llvm-svn: 205986
2014-04-10 20:18:58 +00:00
Tobias Grosser 4f469d65cc todo: Update todo list
llvm-svn: 205985
2014-04-10 19:49:36 +00:00
Tobias Grosser fc8d81e5cb www: Fix typo
llvm-svn: 205984
2014-04-10 19:21:12 +00:00
Tobias Grosser 884f6ad09b todo: Building against an installed LLVM works
We only care about cmake and the buildbots test that it works.

llvm-svn: 205983
2014-04-10 19:20:30 +00:00
Tobias Grosser 52bacf5900 www: We have no interest in FORTRAN support in test suite
llvm-svn: 205982
2014-04-10 19:19:11 +00:00
Reid Kleckner d378a71b4e inalloca: Pad the struct *after* inserting each arg
This ensures that the overall struct size will be a multiple of 4, as
required by the ABI.

llvm-svn: 205981
2014-04-10 19:09:43 +00:00
Tobias Grosser 7701194d61 Add link to meeting notes
llvm-svn: 205980
2014-04-10 18:44:50 +00:00
Adrian Prantl bad6b83506 Revert "Follow-up to r205973: change the return type to const MDNode*."
This reverts commit r205974, it turns out that this wasn't such a great idea
after all. Using DIVariable as return value is self-documenting and marginally
more type safe.

llvm-svn: 205979
2014-04-10 18:37:53 +00:00
Enrico Granata bd4885f129 <rdar://problem/16540961>
The "unexpected value" message only matters to me, but is bound to make the experience more confusing for people when some uninitialized memory looks like an NSNumber and then can't be formatted properly, and that error comes out in the UI

Just drop the error message entirely - nobody but me cares

llvm-svn: 205978
2014-04-10 18:17:30 +00:00
Justin Bogner f2ea775ed9 CodeGen: Move PGO initialization into Release()
Emitting the PGO initialization in EmitGlobalFunctionDefinition is
inefficient, since this only has an effect once per module.  We move
this to Release() with the rest of the once-per-module logic.

llvm-svn: 205977
2014-04-10 18:13:13 +00:00
Aaron Ballman 582e4f74da Some minor improvements to the thread safety intermediate language -- mostly const correctness and reformatting. Fixes the types involved with castOpcode().
llvm-svn: 205976
2014-04-10 18:12:58 +00:00
Ben Langmuir 2c9af44c26 When module umbrellas change, rebuild them
With the VFS, it is easy to hit modified umbrellas by overriding the
umbrella header, and what we want is to rebuild, not to fail.

llvm-svn: 205975
2014-04-10 17:57:43 +00:00
Adrian Prantl dbfbaf6730 Follow-up to r205973: change the return type to const MDNode*.
llvm-svn: 205974
2014-04-10 17:50:30 +00:00
Adrian Prantl 7f48777609 Debug info: Factor the retrieving of the DIVariable from a MachineInstr
into a function.

llvm-svn: 205973
2014-04-10 17:39:48 +00:00
David Majnemer 9832a3d1e0 CodeGen: Clean up CommonLinkage calculation
No functionality change.

llvm-svn: 205972
2014-04-10 16:53:16 +00:00
Sebastian Pop cd3bb59aa2 only delinearize when the access function is not affine
llvm-svn: 205971
2014-04-10 16:08:11 +00:00
NAKAMURA Takumi 543105f7b7 AddLLVM: Mute the prefix "lib" in SHARED on win32.
- LLVMSupport.dll
  - libLLVMSupport.dll.a

llvm-svn: 205969
2014-04-10 15:47:04 +00:00
Daniel Sanders 77277ea501 [mips] NotMips64 predicate is really a test for 32-bit GPR's.
Summary:
Similarly, the HasMips64 on the 64-bit move InstAlias is a test for 64-bit
GPR's.

No functional change.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

llvm-svn: 205968
2014-04-10 15:00:28 +00:00
Christian Pirker ba289f0c64 ARM: Add command line option to select big or little endian
llvm-svn: 205967
2014-04-10 13:59:32 +00:00
Christian Pirker 02c2e25d74 AArch64: Add command line option to select big or little endian
llvm-svn: 205966
2014-04-10 13:55:51 +00:00
Arnold Schwaighofer b373e01d87 Reapply "SLPVectorizer: Ignore users that are insertelements we can reschedule them"
This commit reapplies 205018. After 205855 we should correctly vectorize
intrinsics.

llvm-svn: 205965
2014-04-10 13:41:35 +00:00
Daniel Sanders ca275d2a14 [mips] Switch the MIPS-III and MIPS-IV assembler tests to use -mcpu=mips4.
Summary:
It is now the smallest superset for these ISA's.

FeatureMips4 now contains FeatureFPIdx since [ls][dw]xc1 were added in MIPS-IV.
Made the FPIdx feature bit lowercase so that it can be used in the -mattr option.

Depends on D3274

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

llvm-svn: 205964
2014-04-10 13:16:49 +00:00
NAKAMURA Takumi 12fbced6e8 ARM64/*/LLVMBuild.txt: Prune redundant deps.
llvm-svn: 205963
2014-04-10 12:46:13 +00:00
NAKAMURA Takumi 554c287262 LLVMBuild.txt: Add missing dependencies.
llvm-svn: 205962
2014-04-10 11:16:47 +00:00
NAKAMURA Takumi 98905d3f85 LLVMBuild.txt: Reformat.
llvm-svn: 205961
2014-04-10 11:16:17 +00:00
Richard Sandiford d03f7b7bd3 [SystemZ] Don't indent SystemZTargetInfo relative to its namespace
Whitespace only.  No functional change intended.

llvm-svn: 205960
2014-04-10 09:56:24 +00:00
Dmitri Gribenko 2a59e327f0 SaveAndRestore: fix coding style and Doxygenify comments
llvm-svn: 205959
2014-04-10 09:44:32 +00:00
Tobias Grosser 79baa21242 ScopInfo: Scalar accesses are zero dimensional
llvm-svn: 205958
2014-04-10 08:38:02 +00:00
Tobias Grosser 6defb5bd6d ScopInfo: Some code cleanup
llvm-svn: 205957
2014-04-10 08:37:44 +00:00
David Majnemer 678088148c Update to match changes made in r205955
llvm-svn: 205956
2014-04-10 07:49:18 +00:00
David Majnemer 7788033be6 YAMLIO: Allow scalars to dictate quotation rules
Introduce ScalarTraits::mustQuote which determines whether or not a
StringRef needs quoting before it is acceptable to output.

llvm-svn: 205955
2014-04-10 07:37:33 +00:00