- Apr 30, 2014
-
-
Craig Topper authored
Use makeArrayRef insted of calling ArrayRef<T> constructor directly. I introduced most of these recently. llvm-svn: 207616
-
Saleem Abdulrasool authored
This introduces the stack lowering emission of the stack probe function for Windows on ARM. The stack on Windows on ARM is a dynamically paged stack where any page allocation which crosses a page boundary of the following guard page will cause a page fault. This page fault must be handled by the kernel to ensure that the page is faulted in. If this does not occur and a write access any memory beyond that, the page fault will go unserviced, resulting in an abnormal program termination. The watermark for the stack probe appears to be at 4080 bytes (for accommodating the stack guard canaries and stack alignment) when SSP is enabled. Otherwise, the stack probe is emitted on the page size boundary of 4096 bytes. llvm-svn: 207615
-
NAKAMURA Takumi authored
ConstantHoisting.cpp: Add <tuple> for std::tie, since r207593 removed FileSystem.h, it includes <tuple>. llvm-svn: 207614
-
Saleem Abdulrasool authored
Emit the COFF header when printing out the function. This is important as the header contains two important pieces of information: the storage class for the symbol and the symbol type information. This bit of information is required for the linker to correctly identify the type of symbol that it is dealing with. llvm-svn: 207613
-
Craig Topper authored
llvm-svn: 207611
-
Craig Topper authored
De-virtualize or remove some methods that have no overrides nor override anything. In some cases remove all together if there are no callers either. llvm-svn: 207610
-
Saleem Abdulrasool authored
When building with -Werror=covered-switch-default (as on the buildbots), the build would fail since all cases are covered by the switch. Move the llvm_unreachable to the end of the function as an annotation. llvm-svn: 207609
-
Saleem Abdulrasool authored
IMAGE_REL_ARM_MOV32T relocations require that the movw/movt pair-wise relocation is not split up and reordered. When expanding the mov32imm pseudo-instruction, create a bundle if the machine operand is referencing an address. This helps ensure that the relocatable address load is not reordered by subsequent passes. Unfortunately, this only partially handles the case as the Constant Island Pass occurs after the instructions are unbundled and does not properly handle bundles. That is a more fundamental issue with the pass itself and beyond the scope of this change. llvm-svn: 207608
-
Nico Weber authored
NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there. llvm-svn: 207607
-
Nico Weber authored
glibc expects that stddef.h only defines a single thing if either of these defines is set. For example, before this change, a C file containing #include <stdlib.h> int ptrdiff_t = 0; would compile with gcc but not with clang. Now it compiles with clang too. This also fixes PR12997, where older versions of the Linux headers would define NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to redefine NULL with the correct definition. llvm-svn: 207606
-
Rui Ueyama authored
Linker should create _imp_ symbols for local use only when such symbols cannot be resolved in any other way. If it overrides real imported symbols, such symbols remain virtually unresolved without error, causing odd issues. I observed that a program linked with LLD entered an infinite loop before reaching main() because of this issue. This patch moves the virtual file creating _imp_ symbols to the very end of the input file list. Previously, the file is at the end of the library file group. Linker might revisit the group many times, so it was not really at the end of the input file list. llvm-svn: 207605
-
Rafael Espindola authored
We can now use EvaluateAsValue to make it non recursive and remove some code duplication. llvm-svn: 207604
-
Richard Smith authored
This fixes a bug where an update record causes us to load an entity that refers to an entity we've not finished loading yet, resulting in badness. llvm-svn: 207603
-
Rafael Espindola authored
After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and always print assembly that uses cfi directives. In llvm, MC itself supports cfi since the end of 2010 (support started in r119972, is reported in the 2.9 release notes). In binutils the support has been around for much longer. It looks like support started to be added in May 2003. It is available in 2.15 (31-Aug-2011, 2.14 is from 12-Jun-2003). llvm-svn: 207602
-
Chandler Carruth authored
wrong iterator category. These aren't comprehensive, but they have caught the common cases for me and produce much nicer errors. llvm-svn: 207601
-
Jason Molenda authored
of these correct after the changes of r194302. <rdar://problem/16176270> llvm-svn: 207600
-
Alexey Samsonov authored
Streamline parsing and dumping line tables: Prefer composition to multiple inheritance in DWARFDebugLine::ParsingState. Get rid of the weird concept of "DumpingState" structure. was: DWARFDebugLine::DumpingState state(OS); DWARFDebugLine::parseStatementTable(..., state); now: DWARFDebugLine::LineTable LineTable; LineTable.parse(...); LineTable.dump(OS); No functionality change. llvm-svn: 207599
-
Reid Kleckner authored
Currently, musttail codegen is relying on sibcall optimization, and reporting a fatal error if fails. Sibcall optimization fails when stack arguments need to be modified, which is insufficient for musttail. The logic for moving arguments in memory safely is already implemented for GuaranteedTailCallOpt. This change merely arranges for musttail calls to use it. No functional change for GuaranteedTailCallOpt. Reviewers: espindola Differential Revision: http://reviews.llvm.org/D3493 llvm-svn: 207598
-
Reid Kleckner authored
MSVC 2013 provides std::make_unique, which it finds with ADL when one of the parameters is std::unique_ptr, leading to an ambiguous overload. llvm-svn: 207597
-
Benjamin Kramer authored
llvm-svn: 207596
-
David Blaikie authored
Caught by Eric Christopher in post-commit review. llvm-svn: 207595
-
Benjamin Kramer authored
llvm-svn: 207594
-
Benjamin Kramer authored
llvm-svn: 207593
-
Tom Stellard authored
It's already set in AMDGPUISelLowering for all GPUs Patch By: Jan Vesely Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> llvm-svn: 207592
-
Tom Stellard authored
SI_IF and SI_ELSE are terminators which also produce a value. For these instructions ISel always inserts a COPY to move their value to another basic block. This COPY ends up between SI_(IF|ELSE) and the S_BRANCH* instruction at the end of the block. This breaks MachineBasicBlock::getFirstTerminator() and also the machine verifier which assumes that terminators are grouped together at the end of blocks. To solve this we coalesce the copy away right after ISel to make sure there are no instructions in between terminators at the end of blocks. llvm-svn: 207591
-
Tom Stellard authored
SALU instructions ignore control flow, so it is not always safe to use them within branches. This is a partial solution to this problem until we can come up with something better. llvm-svn: 207590
-
Tom Stellard authored
This is a squash of several optimization commits: - calculate DIV_Lo and DIV_Hi separately - use BFE_U32 if we are operating on 32bit values - use precomputed constants instead of shifting in UDVIREM - skip the first 32 iterations of udivrem v2: Check whether BFE is supported before using it Patch by: Jan Vesely Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> llvm-svn: 207589
-
Tom Stellard authored
Initial implementation, rather slow Patch by: Jan Vesely Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> llvm-svn: 207588
-
Tom Stellard authored
When legalizing ops, with UDIV/UREM set to expand, they automatically expand to UDIVREM (if legal or custom). We need to do this manually for legalize types. v2: SI should be set to Expand because the type is legal, and it is automatically lowered to UDIVREM if UDIVREM is Legal/Custom R600 should set to UDIV/UREM to Custom because it needs to lower them during type legalization Patch by: Jan Vesely Signed-off-by:Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> llvm-svn: 207587
-
Tom Stellard authored
Patch by: Jan Vesely Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> llvm-svn: 207586
-
Jim Grosbach authored
llvm-svn: 207585
-
Jim Grosbach authored
llvm-svn: 207584
-
Jim Grosbach authored
llvm-svn: 207583
-
Rafael Espindola authored
llvm-svn: 207582
-
David Blaikie authored
Seems MSVC wants to be able to codegen inline-definitions of virtual functions even in TUs that don't define the key function - and it's well within its rights to do so. llvm-svn: 207581
-
David Blaikie authored
This starts in MCJIT::getSymbolAddress where the unique_ptr<object::Binary> is release()d and (after a cast) passed to a single caller, MCJIT::addObjectFile. addObjectFile calls RuntimeDyld::loadObject. RuntimeDld::loadObject calls RuntimeDyldELF::createObjectFromFile And the pointer is never owned at this point. I say this point, because the alternative codepath, RuntimeDyldMachO::createObjectFile certainly does take ownership, so this seemed like a good hint that this was a/the right place to take ownership. llvm-svn: 207580
-
Alexey Samsonov authored
Move several function definitions into .cpp, unify constructors and clear() methods (fixing a couple of latent bugs from copy-paste), turn static function parsePrologue() into Prologue::parse(). More work needed here to untangle weird multiple inheritance in table parsing and dumping. No functionality change. llvm-svn: 207579
-
Rafael Espindola authored
Sorry, new machine and I forgot to change the editor setting. llvm-svn: 207578
-
Rafael Espindola authored
The instcomine logic to handle vpermilvar's pd and 256 variants was incorrect. The _256 variants have indexes into the individual 128 bit lanes and in all cases it also has to mask out unused bits. llvm-svn: 207577
-
Andrea Di Biagio authored
crash with an assertion failure when 'nul' is passed in input. Modified clang/test/lit.py to add feature 'system-windows' if `platform.system()` returns 'Windows'. llvm-svn: 207576
-