Skip to content
  1. Nov 14, 2011
  2. Nov 13, 2011
    • Chandler Carruth's avatar
      Cleanup some 80-columns violations and poor formatting. These snuck by · c4a2cb34
      Chandler Carruth authored
      when I was reading through the code for style.
      
      llvm-svn: 144513
      c4a2cb34
    • Jakob Stoklund Olesen's avatar
      Terminate all dead defs at the dead slot instead of the 'next' slot. · d8f2405e
      Jakob Stoklund Olesen authored
      This makes no difference for normal defs, but early clobber dead defs
      now look like:
      
        [Slot_EarlyClobber; Slot_Dead)
      
      instead of:
      
        [Slot_EarlyClobber; Slot_Register).
      
      Live ranges for normal dead defs look like:
      
        [Slot_Register; Slot_Dead)
      
      as before.
      
      llvm-svn: 144512
      d8f2405e
    • Craig Topper's avatar
      Fix comment for LegalizeTypeAction enum. · 424ca7bb
      Craig Topper authored
      llvm-svn: 144511
      424ca7bb
    • Argyrios Kyrtzidis's avatar
      [PCH] When chaining a PCH and serializing HeaderSearch, make sure the HeaderFileInfos · f5ab0345
      Argyrios Kyrtzidis authored
      from the primary PCH is deserialized, otherwise we lose info that headers were
      already #imported/#included.
      
      llvm-svn: 144510
      f5ab0345
    • Argyrios Kyrtzidis's avatar
    • Argyrios Kyrtzidis's avatar
    • Jakob Stoklund Olesen's avatar
      Simplify early clobber slots a bit. · ce7cc08f
      Jakob Stoklund Olesen authored
      llvm-svn: 144507
      ce7cc08f
    • Rafael Espindola's avatar
      6cfa82bc
    • Chandler Carruth's avatar
      Enhance the assertion mechanisms in place to make it easier to catch · 8e1d9067
      Chandler Carruth authored
      when we fail to place all the blocks of a loop. Currently this is
      happening for unnatural loops, and this logic helps more immediately
      point to the problem.
      
      llvm-svn: 144504
      8e1d9067
    • Jakob Stoklund Olesen's avatar
      Rename SlotIndexes to match how they are used. · 90b5e565
      Jakob Stoklund Olesen authored
      The old naming scheme (load/use/def/store) can be traced back to an old
      linear scan article, but the names don't match how slots are actually
      used.
      
      The load and store slots are not needed after the deferred spill code
      insertion framework was deleted.
      
      The use and def slots don't make any sense because we are using
      half-open intervals as is customary in C code, but the names suggest
      closed intervals.  In reality, these slots were used to distinguish
      early-clobber defs from normal defs.
      
      The new naming scheme also has 4 slots, but the names match how the
      slots are really used.  This is a purely mechanical renaming, but some
      of the code makes a lot more sense now.
      
      llvm-svn: 144503
      90b5e565
    • Craig Topper's avatar
      Add BLSI, BLSMSK, and BLSR to getTargetNodeName. · b8bcb473
      Craig Topper authored
      llvm-svn: 144502
      b8bcb473
    • David Chisnall's avatar
      On FreeBSD, define a macro that causes the unimplemented C99 math.h functions... · 5e8e0448
      David Chisnall authored
      On FreeBSD, define a macro that causes the unimplemented C99 math.h functions to be declared.  This prevents <cmath> users from being broken, unless they actually use the C++ wrappers that call the missing functions.
      
      llvm-svn: 144501
      5e8e0448
    • Benjamin Kramer's avatar
      Silence unused variable warning. · 1871ed3d
      Benjamin Kramer authored
      llvm-svn: 144500
      1871ed3d
    • Chandler Carruth's avatar
      Teach MBP to force-merge layout successors for blocks with unanalyzable · 0bb42c0f
      Chandler Carruth authored
      branches that also may involve fallthrough. In the case of blocks with
      no fallthrough, we can still re-order the blocks profitably. For example
      instruction decoding will in some cases continue past an indirect jump,
      making laying out its most likely successor there profitable.
      
      Note, no test case. I don't know how to write a test case that exercises
      this logic, but it matches the described desired semantics in
      discussions with Jakob and others. If anyone has a nice example of IR
      that will trigger this, that would be lovely.
      
      Also note, there are still assertion failures in real world code with
      this. I'm digging into those next, now that I know this isn't the cause.
      
      llvm-svn: 144499
      0bb42c0f
    • Chandler Carruth's avatar
      Hoist another gross nested loop into a helper method. · f9213fe7
      Chandler Carruth authored
      llvm-svn: 144498
      f9213fe7
    • Chandler Carruth's avatar
      Add a missing doxygen comment for a helper method. · eb4ec3ae
      Chandler Carruth authored
      llvm-svn: 144497
      eb4ec3ae
    • Chandler Carruth's avatar
      Hoist a nested loop into its own method. · b336172f
      Chandler Carruth authored
      llvm-svn: 144496
      b336172f
    • Chandler Carruth's avatar
      Rewrite #3 of machine block placement. This is based somewhat on the · 8d150789
      Chandler Carruth authored
      second algorithm, but only loosely. It is more heavily based on the last
      discussion I had with Andy. It continues to walk from the inner-most
      loop outward, but there is a key difference. With this algorithm we
      ensure that as we visit each loop, the entire loop is merged into
      a single chain. At the end, the entire function is treated as a "loop",
      and merged into a single chain. This chain forms the desired sequence of
      blocks within the function. Switching to a single algorithm removes my
      biggest problem with the previous approaches -- they had different
      behavior depending on which system triggered the layout. Now there is
      exactly one algorithm and one basis for the decision making.
      
      The other key difference is how the chain is formed. This is based
      heavily on the idea Andy mentioned of keeping a worklist of blocks that
      are viable layout successors based on the CFG. Having this set allows us
      to consistently select the best layout successor for each block. It is
      expensive though.
      
      The code here remains very rough. There is a lot that needs to be done
      to clean up the code, and to make the runtime cost of this pass much
      lower. Very much WIP, but this was a giant chunk of code and I'd rather
      folks see it sooner than later. Everything remains behind a flag of
      course.
      
      I've added a couple of tests to exercise the issues that this iteration
      was motivated by: loop structure preservation. I've also fixed one test
      that was exhibiting the broken behavior of the previous version.
      
      llvm-svn: 144495
      8d150789
    • Chad Rosier's avatar
      The order in which the predicate is added differs between Thumb and ARM mode. ... · 1198d894
      Chad Rosier authored
      The order in which the predicate is added differs between Thumb and ARM mode.  Fix predicate when in ARM mode and restore SelectIntrinsicCall.
      
      llvm-svn: 144494
      1198d894
    • Greg Clayton's avatar
      <rdar://problem/10126482> · da7bc7d0
      Greg Clayton authored
      Fixed an issues with the SBType and SBTypeMember classes:
      - Fixed SBType to be able to dump itself from python
      - Fixed SBType::GetNumberOfFields() to return the correct value for objective C interfaces
      - Fixed SBTypeMember to be able to dump itself from python
      - Fixed the SBTypeMember ability to get a field offset in bytes (the value
        being returned was wrong)
      - Added the SBTypeMember ability to get a field offset in bits
      
      
      Cleaned up a lot of the Stream usage in the SB API files.
      
      llvm-svn: 144493
      da7bc7d0
    • Chad Rosier's avatar
    • Greg Clayton's avatar
      <rdar://problem/10103980> · 93e8619d
      Greg Clayton authored
      A long time ago we started to centralized the STDOUT in lldb_private::Process
      but we missed a few things still in ProcessGDBRemote.
      
      llvm-svn: 144491
      93e8619d
    • Chad Rosier's avatar
      Fix comments. · 5196efdf
      Chad Rosier authored
      llvm-svn: 144490
      5196efdf
    • Greg Clayton's avatar
      <rdar://problem/10338439> · 2fc93eab
      Greg Clayton authored
      This is the actual fix for the above radar where global variables that weren't
      initialized were not being shown correctly when leaving the DWARF in the .o 
      files. Global variables that aren't intialized have symbols in the .o files
      that specify they are undefined and external to the .o file, yet document the
      size of the variable. This allows the compiler to emit a single copy, but makes
      it harder for our DWARF in .o files with the executable having a debug map
      because the symbol for the global in the .o file doesn't exist in a section
      that we can assign a fixed up linked address to, and also the DWARF contains
      an invalid address in the "DW_OP_addr" location (always zero). This means that
      the DWARF is incorrect and actually maps all such global varaibles to the
      first file address in the .o file which is usually the first function. So we
      can fix this in either of two ways: make a new fake section in the .o file
      so that we have a file address in the .o file that we can relink, or fix the 
      the variable as it is created in the .o file DWARF parser and actually give it
      the file address from the executable. Each variable contains a 
      SymbolContextScope, or a single pointer that helps us to recreate where the
      variables came from (which module, file, function, etc). This context helps
      us to resolve any file addresses that might be in the location description of
      the variable by pointing us to which file the file address comes from, so we
      can just replace the SymbolContextScope and also fix up the location, which we
      would have had to do for the other case as well, and update the file address.
      Now globals display correctly.
      
      The above changes made it possible to determine if a variable is a global
      or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag
      for each variable (local, global, or static), yet DWARF provides no way for
      us to classify these variables into these categories. We can now detect when
      a variable has a simple address expressions as its location and this will help
      us classify these correctly.
      
      While making the above changes I also noticed that we had two symbol types:
      eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same
      thing: the symbol is not defined in the current object file. Symbol objects
      also have a bit that specifies if a symbol is externally visible, so I got
      rid of the eSymbolTypeExtern symbol type and moved all code locations that
      used it to use the eSymbolTypeUndefined type.
       
      
      llvm-svn: 144489
      2fc93eab
    • Chad Rosier's avatar
      Add support for emitting both signed- and zero-extend loads. Fix · c8cfd3a8
      Chad Rosier authored
      SimplifyAddress to handle either a 12-bit unsigned offset or the ARM +/-imm8
      offsets (addressing mode 3).  This enables a load followed by an integer 
      extend to be folded into a single load.
      
      For example:
      ldrb r1, [r0]       ldrb r1, [r0]
      uxtb r2, r1     =>
      mov  r3, r2         mov  r3, r1
      
      llvm-svn: 144488
      c8cfd3a8
    • NAKAMURA Takumi's avatar
      Prune more RALinScan. RALinScan was also here! · 4784df71
      NAKAMURA Takumi authored
      llvm-svn: 144487
      4784df71
    • Jakob Stoklund Olesen's avatar
      More dead code elimination in VirtRegMap. · c601d8c7
      Jakob Stoklund Olesen authored
      This thing is looking a lot like a virtual register map now.
      
      llvm-svn: 144486
      c601d8c7
Loading