Skip to content
  • Renato Golin's avatar
    Add #pragma vectorize enable/disable to LLVM · 729a3ae9
    Renato Golin authored
    The intended behaviour is to force vectorization on the presence
    of the flag (either turn on or off), and to continue the behaviour
    as expected in its absence. Tests were added to make sure the all
    cases are covered in opt. No tests were added in other tools with
    the assumption that they should use the PassManagerBuilder in the
    same way.
    
    This patch also removes the outdated -late-vectorize flag, which was
    on by default and not helping much.
    
    The pragma metadata is being attached to the same place as other loop
    metadata, but nothing forbids one from attaching it to a function
    (to enable #pragma optimize) or basic blocks (to hint the basic-block
    vectorizers), etc. The logic should be the same all around.
    
    Patches to Clang to produce the metadata will be produced after the
    initial implementation is agreed upon and committed. Patches to other
    vectorizers (such as SLP and BB) will be added once we're happy with
    the pass manager changes.
    
    llvm-svn: 196537
    729a3ae9
Loading