Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: lib/Transforms/NaCl/ExpandShuffleVector.cpp

Issue 282553003: PNaCl translator: combine insertelement / extractelement patterns generated by the toolchain into s… (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Add DCE, address dschuff's comments. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- ExpandShuffleVector.cpp - shufflevector to {insert/extract}element -===// 1 //===- ExpandShuffleVector.cpp - shufflevector to {insert/extract}element -===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // Replace all shufflevector instructions by insertelement / 10 // Replace all shufflevector instructions by insertelement /
11 // extractelement. InstCombine should be able to reconstruct the 11 // extractelement. CombineVectorInstructions is able to reconstruct the
12 // shufflevector, 12 // shufflevector.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #include "llvm/IR/BasicBlock.h" 16 #include "llvm/IR/BasicBlock.h"
17 #include "llvm/IR/Constants.h" 17 #include "llvm/IR/Constants.h"
18 #include "llvm/IR/IRBuilder.h" 18 #include "llvm/IR/IRBuilder.h"
19 #include "llvm/IR/Instruction.h" 19 #include "llvm/IR/Instruction.h"
20 #include "llvm/IR/Instructions.h" 20 #include "llvm/IR/Instructions.h"
21 #include "llvm/IR/Module.h" 21 #include "llvm/IR/Module.h"
22 #include "llvm/IR/Type.h" 22 #include "llvm/IR/Type.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 for (Instructions::iterator S = Shufs.begin(), E = Shufs.end(); S != E; ++S) 100 for (Instructions::iterator S = Shufs.begin(), E = Shufs.end(); S != E; ++S)
101 Expand(*S, Int32); 101 Expand(*S, Int32);
102 102
103 return !Shufs.empty(); 103 return !Shufs.empty();
104 } 104 }
105 105
106 BasicBlockPass *llvm::createExpandShuffleVectorPass() { 106 BasicBlockPass *llvm::createExpandShuffleVectorPass() {
107 return new ExpandShuffleVector(); 107 return new ExpandShuffleVector();
108 } 108 }
OLDNEW
« no previous file with comments | « lib/Transforms/NaCl/CombineVectorInstructions.cpp ('k') | test/Transforms/NaCl/combine-shuffle-vector.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698