summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* De-virtualize or remove some methods that have no overrides nor override ↵Craig Topper2014-04-307-27/+7
| | | | | | anything. In some cases remove all together if there are no callers either. llvm-svn: 207610
* ARM: move llvm_unreachable useSaleem Abdulrasool2014-04-301-1/+1
| | | | | | | | 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
* ARM: partially handle 32-bit relocations for WoASaleem Abdulrasool2014-04-302-0/+72
| | | | | | | | | | | | | | | 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
* Add a triple to new test.Nico Weber2014-04-301-1/+1
| | | | | | NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there. llvm-svn: 207607
* Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.Nico Weber2014-04-303-5/+105
| | | | | | | | | | | | | | | | 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
* [PECOFF] Fix priority of locally imported symbols.Rui Ueyama2014-04-302-1/+8
| | | | | | | | | | | | | | | | 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
* Simplify getSymbolOffset.Rafael Espindola2014-04-301-26/+28
| | | | | | | We can now use EvaluateAsValue to make it non recursive and remove some code duplication. llvm-svn: 207604
* Defer loading any pending update records until we've finished deserializing.Richard Smith2014-04-305-19/+20
| | | | | | | 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
* Drop non-cfi assembly support from clang.Rafael Espindola2014-04-307-66/+2
| | | | | | | | | | | | | | 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
* [ADT] Provide some helpful static_asserts for using operations of theChandler Carruth2014-04-301-5/+59
| | | | | | | wrong iterator category. These aren't comprehensive, but they have caught the common cases for me and produce much nicer errors. llvm-svn: 207601
* Correct offsets in the debugserver arm back end for the s and d registers so ↵Jason Molenda2014-04-301-4/+4
| | | | | | | | | we get the offsets of these correct after the changes of r194302. <rdar://problem/16176270> llvm-svn: 207600
* [DWARF parser] Cleanup code in DWARFDebugLine.Alexey Samsonov2014-04-303-128/+112
| | | | | | | | | | | | | | | | | | 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
* Implement X86 code generation for musttailReid Kleckner2014-04-294-49/+276
| | | | | | | | | | | | | | | | | | 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
* Fix the build with MSVC 2013 by explicitly requesting llvm::make_uniqueReid Kleckner2014-04-291-13/+17
| | | | | | | 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
* Another missing include for MSVC.Benjamin Kramer2014-04-291-1/+1
| | | | llvm-svn: 207596
* Fix some 80 cols violations committed in r207539David Blaikie2014-04-292-4/+8
| | | | | | Caught by Eric Christopher in post-commit review. llvm-svn: 207595
* Try to fix the msvc build.Benjamin Kramer2014-04-292-0/+2
| | | | llvm-svn: 207594
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-2930-4/+36
| | | | | | necessary. llvm-svn: 207593
* R600: Remove duplicate setting of SELECT expansion.Tom Stellard2014-04-291-2/+0
| | | | | | | | | | 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
* R600/SI: Custom lower SI_IF and SI_ELSE to avoid machine verifier errorsTom Stellard2014-04-2927-40/+88
| | | | | | | | | | | | | | | | 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
* R600/SI: Only select SALU instructions in the entry or exit blockTom Stellard2014-04-293-27/+144
| | | | | | | | 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
* R600: optimize the UDIVREM 64 algorithmTom Stellard2014-04-292-22/+128
| | | | | | | | | | | | | | | | 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
* R600: Implement iterative algorithm for udivremTom Stellard2014-04-291-0/+50
| | | | | | | | | | 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
* R600: Change UDIV/UREM to UDIVREM when legalizing typesTom Stellard2014-04-293-1/+28
| | | | | | | | | | | | | | | | | | 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
* R600: remove unused variableTom Stellard2014-04-291-2/+0
| | | | | | | | Patch by: Jan Vesely Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 207586
* Tidy up.Jim Grosbach2014-04-291-2/+2
| | | | llvm-svn: 207585
* Spelling.Jim Grosbach2014-04-291-1/+1
| | | | llvm-svn: 207584
* Tidy up whitespace.Jim Grosbach2014-04-291-7/+7
| | | | llvm-svn: 207583
* Also handle ConstantAggregateZero when optimizing vpermilvar*.Rafael Espindola2014-04-292-20/+50
| | | | llvm-svn: 207582
* Fix MSVC build broken by r207580David Blaikie2014-04-292-4/+6
| | | | | | | | 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
* PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFileDavid Blaikie2014-04-2910-57/+78
| | | | | | | | | | | | | | | | 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
* [DWARF parser] Cleanup code in DWARFDebugLine.Alexey Samsonov2014-04-293-98/+119
| | | | | | | | | | | | | 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
* Remove tabs.Rafael Espindola2014-04-291-4/+4
| | | | | | Sorry, new machine and I forgot to change the editor setting. llvm-svn: 207578
* Two fixes to the vpermilvar optimization.Rafael Espindola2014-04-292-5/+28
| | | | | | | | 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
* Add test case for revision 207575 to verify that on Windows, clang doesn'tAndrea Di Biagio2014-04-292-0/+11
| | | | | | | | | 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
* [Windows] Fix assertion failure when passing 'nul' in input to clang.Andrea Di Biagio2014-04-291-3/+18
| | | | | | | | | | | | | | | | | Before this patch, if 'nul' was passed in input to clang, function getStatus() (in Path.inc) always returned an instance of file_status with field 'nFileSizeHigh' and 'nFileSizeLow' left uninitialized. This was causing the triggering of an assertion failure in MemoryBuffer.cpp due to an invalid FileSize for device 'nul'. This patch fixes the assertion failure modifying the constructors of class file_status (in llvm/Support/FileSystem.h) so that every field of the class gets initialized to zero by default. A clang test will be submitted on a separate patch. llvm-svn: 207575
* Fix vectorization remarks.Diego Novillo2014-04-293-6/+105
| | | | | | | | | This patch changes the vectorization remarks to also inform when vectorization is possible but not beneficial. Added tests to exercise some loop remarks. llvm-svn: 207574
* scanf analysis: handle scanlists that start with ^] (PR19559)Hans Wennborg2014-04-292-0/+14
| | | | llvm-svn: 207573
* Continue slp vectorization even the BB already has vectorized store ↵Yi Jiang2014-04-292-1/+32
| | | | | | radar://16641956 llvm-svn: 207572
* Add slp vectorization to LTO passesYi Jiang2014-04-291-0/+3
| | | | llvm-svn: 207571
* [PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a ↵Argyrios Kyrtzidis2014-04-296-6/+18
| | | | | | | | driver only thing and doesn't affect any language/preprocessor/etc. semantics. rdar://16714526 llvm-svn: 207570
* Reapply r207271 without the testcaseAdam Nemet2014-04-291-9/+12
| | | | | | PR19608 was filed to find a suitable testcase. llvm-svn: 207569
* Added gdb remote protocol tests for no output and inferior non-zero exit code.Todd Fiala2014-04-293-17/+129
| | | | | | | | | | Tests added for debugserver and lldb-gdbserver. lldb-gdbserver marked as XFAIL on top of tree. Added build_gdbremote_A_packet test helper to construct a gdbremote A launch packet from a list of args. llvm-svn: 207568
* Android uses -fpic for aarch64.Logan Chien2014-04-292-0/+3
| | | | llvm-svn: 207567
* Fix interval recalculation in the event that usleep is interruptedEd Maste2014-04-291-1/+1
| | | | llvm-svn: 207566
* Add Simple return instruction to Mips fast-iselReed Kotler2014-04-292-2/+67
| | | | | | | | | | Reviewers: dsanders Reviewed by: dsanders Differential Revision: http://reviews.llvm.org/D3430 llvm-svn: 207565
* Typo: forever is one wordEd Maste2014-04-291-1/+1
| | | | llvm-svn: 207564
* [DWARF parser] Compress DIEMinimal even further, simplify building DIE tree.Alexey Samsonov2014-04-292-62/+29
| | | | | | | | | | | DIE doesn't need to store a pointer to its parent: we can traverse the DIE tree only with functions getFirstChild() and getSibling(). Parents must be known only when we construct the tree. Rewrite setDIERelations() procedure in a more straightforward way, and get rid of lots of now unused DIEMinimal methods. No functionality change. llvm-svn: 207563
* [analyzer] Improve test from r207486.Jordan Rose2014-04-291-5/+8
| | | | | | | | | | | | The constructor that comes right before a variable declaration in the CFG might not be the initialization of that variable. Previously, we just checked that the variable's initializer expression was different from the construction expression, but forgot to see whether the variable had an initializer expression at all. Thanks for the prompting, David. llvm-svn: 207562
* [analyzer] Don't assert when combining using .* on a temporary.Jordan Rose2014-04-292-1/+25
| | | | | | | | | | | | | While we don't model pointer-to-member operators yet (neither .* nor ->*), CallAndMessageChecker still checks to make sure the 'this' object is not null or undefined first. However, it also expects that the object should always have a valid MemRegion, something that's generally important elsewhere in the analyzer as well. Ensure this is true ahead of time, just like we do for member access. PR19531 llvm-svn: 207561
OpenPOWER on IntegriCloud