summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-10/+23
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* with recent changes, ConstantArray is never a "string". Remove the associatedChris Lattner2012-01-311-23/+10
| | | | | | methods and constant fold the clients to false. llvm-svn: 149362
* don't emit a 1-byte object as a .fill. This is silly and causesChris Lattner2012-01-311-1/+3
| | | | | | CodeGen/X86/global-sections.ll to fail with CDArray llvm-svn: 149343
* Chris's constant data sequence refactoring actually enabled printingChandler Carruth2012-01-301-1/+1
| | | | | | | | | | | | | | | | vectors of all one bits to be printed more cleverly in the AsmPrinter. Unfortunately, the byte value for all one bits is the same with -fsigned-char as the error return of '-1'. Force this to be the unsigned byte value when returning it to avoid this problem, and update the test case for the shiny new behavior. Yay for building LLVM and Clang with -funsigned-char. Chris, please review, and let me know if there is any reason to not desire this change. It seems good on the surface, and certainly intended based on the code written. llvm-svn: 149299
* when verbose asm is on, print integers in ConstantDataSequentials justChris Lattner2012-01-301-0/+3
| | | | | | like normal integers. llvm-svn: 149223
* don't lose tail padding on ConstantDataAggregate vec3's.Chris Lattner2012-01-301-21/+24
| | | | llvm-svn: 149222
* Add support for the R_ARM_TARGET1 relocation, which should be given to ↵James Molloy2012-01-261-1/+1
| | | | | | | | relocations applied to all C++ constructors and destructors. This enables the linker to match concrete relocation types (absolute or relative) with whatever library or C++ support code is being linked against. llvm-svn: 149057
* Properly emit ctors / dtors with priorities into desired sectionsAnton Korobeynikov2012-01-251-22/+17
| | | | | | | | and let linker handle the rest. This finally fixes PR5329 llvm-svn: 148990
* Use the right method to get the # elements in a CDS.Chris Lattner2012-01-251-3/+3
| | | | llvm-svn: 148897
* Add AsmPrinter (aka MCLowering) support for ConstantDataSequential, Chris Lattner2012-01-241-32/+91
| | | | | | | | and clean up some other misc stuff. Unlike ConstantArray, we will prefer to emit .fill directives for "String" arrays that all have the same value, since they are denser than emitting a .ascii llvm-svn: 148793
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-4/+1
| | | | llvm-svn: 148578
* Revert accidental commit.Bill Wendling2012-01-121-65/+0
| | | | llvm-svn: 148065
* Fix the code that was WRONG.Bill Wendling2012-01-121-0/+65
| | | | | | | The registers are placed into the saved registers list in the reverse order, which is why the original loop was written to loop backwards. llvm-svn: 148064
* Add basic generic CodeGen support for half.Dan Gohman2011-12-201-7/+18
| | | | llvm-svn: 146927
* Add bundle aware API for querying instruction properties and switch the codeEvan Cheng2011-12-071-1/+1
| | | | | | | | | | | | | | generator to it. For non-bundle instructions, these behave exactly the same as the MC layer API. For properties like mayLoad / mayStore, look into the bundle and if any of the bundled instructions has the property it would return true. For properties like isPredicable, only return true if *all* of the bundled instructions have the property. For properties like canFoldAsLoad, isCompare, conservatively return false for bundles. llvm-svn: 146026
* Support vector bitcasts in the AsmPrinter. PR11495.Eli Friedman2011-12-071-2/+24
| | | | llvm-svn: 146001
* Use logarithmic units for basic block alignment.Jakob Stoklund Olesen2011-12-061-1/+1
| | | | | | | | | | | | | | | | | This was actually a bit of a mess. TLI.setPrefLoopAlignment was clearly documented as taking log2(bytes) units, but the x86 target would still set a preferred loop alignment of '16'. CodePlacementOpt passed this number on to the basic block, and AsmPrinter interpreted it as bytes. Now both MachineFunction and MachineBasicBlock use logarithmic alignments. Obviously, MachineConstantPool still measures alignments in bytes, so we can emulate the thrill of using as. llvm-svn: 145889
* Emit the ctors in the proper order on ARM/EABI.Anton Korobeynikov2011-12-031-1/+1
| | | | | | | | Maybe some targets should use this as well. Patch by Evgeniy Stepanov! llvm-svn: 145781
* We currently use a callback to handle an IL pass deleting a BB that stillRafael Espindola2011-11-151-0/+12
| | | | | | | | | | | has a reference to it. Unfortunately, that doesn't work for codegen passes since we don't get notified of MBB's being deleted (the original BB stays). Use that fact to our advantage and after printing a function, check if any of the IL BBs corresponds to a symbol that was not printed. This fixes pr11202. llvm-svn: 144674
* Add more PRI.64 macros for MSVC and use them throughout the codebase.Benjamin Kramer2011-11-051-1/+2
| | | | llvm-svn: 143799
* Teach our Dwarf emission to use the string pool.Nick Lewycky2011-10-271-1/+4
| | | | llvm-svn: 143097
* Teach the MC to output code/data region marker labels in MachO and ELF ↵Owen Anderson2011-10-041-1/+12
| | | | | | modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment. llvm-svn: 141135
* Place this bracket according to the LLVM style.Duncan Sands2011-09-291-2/+1
| | | | llvm-svn: 140784
* Darwin wants ctors/dtors to be ordered the other way round to linux.Duncan Sands2011-09-021-1/+10
| | | | llvm-svn: 139015
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-011-5/+5
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. llvm-svn: 138976
* Fix Size TypingDavid Greene2011-08-311-1/+1
| | | | | | Stores sizes as uint64_t to avoid possible truncation. llvm-svn: 138901
* Compress Repeated Byte OutputDavid Greene2011-08-311-3/+59
| | | | | | | Emit a repeated sequence of bytes using .zero. This saves an enormous amount of asm file space for certain programs. llvm-svn: 138864
* Fix PR5329: pay attention to constructor/destructor priorityDuncan Sands2011-08-281-13/+36
| | | | | | | when outputting them. With this, the entire LLVM testsuite passes when built with dragonegg. llvm-svn: 138724
* Remove an unnecessary cast.Jay Foad2011-08-011-1/+1
| | | | llvm-svn: 136609
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-201-1/+0
| | | | | | | There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. llvm-svn: 135611
* Convert TargetData::getIndexedOffset to use ArrayRef.Jay Foad2011-07-191-2/+1
| | | | llvm-svn: 135478
* Add a frame with the compact unwind encoding if it exists.Bill Wendling2011-07-191-0/+3
| | | | llvm-svn: 135450
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-2/+2
| | | | llvm-svn: 135375
* Handle debug info for i128 constants.Devang Patel2011-06-241-0/+2
| | | | llvm-svn: 133821
* Emit trailing padding on constant vectors when TargetData says that the vectorNick Lewycky2011-06-221-0/+7
| | | | | | is larger than the sum of the elements (including per-element padding). llvm-svn: 133631
* Fix a FIXME by making GlobalVariable::getInitializer() return aJay Foad2011-06-191-4/+4
| | | | | | const Constant *. llvm-svn: 133400
* Handle jump tables. Test to follow soon.Rafael Espindola2011-06-151-0/+2
| | | | llvm-svn: 133083
* Revert r133004 ; it's breaking nightly tests.Eli Friedman2011-06-141-4/+21
| | | | llvm-svn: 133007
* Partial revert of 132882.Rafael Espindola2011-06-141-21/+4
| | | | | | | | | | | | | | | | Dan noted that this would work on the case shown on the commit message. I think the case that was failing was a bb ending with a redundant conditional jump: ... jne foo foo: ... I was unable to find any such case in the tests or in a debug build of clang, so I will revert this part of the patch and watch the bots. llvm-svn: 133004
* Implement Jakob's suggestion on how to detect fall thought without callingRafael Espindola2011-06-141-12/+19
| | | | | | AnalyzeBranch. llvm-svn: 132981
* Really fix the fall-through logic.Rafael Espindola2011-06-121-0/+3
| | | | | | Add a triple to the tests. llvm-svn: 132885
* Fix silly bug I introduce in the previous commit. Fixes debug builds.Rafael Espindola2011-06-121-3/+3
| | | | llvm-svn: 132883
* AnalyzeBranch doesn't change which successors a bb has, just the orderRafael Espindola2011-06-121-4/+11
| | | | | | | | | | | | | | | | | | we try to branch to them. Before we were creating successor lists with duplicated entries. Fixing that found a bug in isBlockOnlyReachableByFallthrough that would causes it to return the wrong answer for ----------- ... jne foo jmp bar foo: ---------- llvm-svn: 132882
* Ensure that EmitGlobalVariable is correctly differentiating between declarationsChad Rosier2011-06-101-1/+1
| | | | | | | | and definitions when emitting global variables. This was causing global declarations to be emitted as if they were definitions. Fixes <rdar://problem/9429892>. llvm-svn: 132825
* When generating code for Win64 EH, emit StartProc and EndProc directives.Charles Davis2011-05-281-0/+5
| | | | llvm-svn: 132250
* Fix the root cause of the bootstrap failure:Rafael Espindola2011-05-281-1/+1
| | | | | | | | There was no way to check if a given register/mode pair was valid. We now return an error code (-2) instead of asserting. If anyone thinks that an assert at this point is really needed, we can autogen a hasValidDwarfRegNum instead. llvm-svn: 132236
* Stub out support for Win64-style exceptions. Note that this is merely usingCharles Davis2011-05-271-0/+3
| | | | | | | the Win64 EH mechanism to implement GCC-style exceptions. LLVM supports hardly anything else at this point! llvm-svn: 132234
* Fix a regression I recently introduced by removing DwarfRegNum ofRafael Espindola2011-05-271-1/+18
| | | | | | | | | | subregisters: When a value is in a subregister, at least report the location as being the superregister. We should extend the .td files to encode the bit range so that we can produce a DW_OP_bit_piece. llvm-svn: 132224
* Make size computation less brittle.Rafael Espindola2011-05-271-20/+0
| | | | llvm-svn: 132222
* Replace the -unwind-tables option with a per function flag. This is moreRafael Espindola2011-05-251-7/+3
| | | | | | | LTO friendly as we can now correctly merge files compiled with or without -fasynchronous-unwind-tables. llvm-svn: 132033
OpenPOWER on IntegriCloud