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

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 563303002: Switch to llvm::findFirstSet instead of ffs since mingw doesn't have ffs. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index abc6b41ea8760d2938c412b10fb80e841d3589f6..d1fdfc2f97868dcd9f11a6a5b76ca0396912d65c 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -24,10 +24,9 @@
#include "IceTargetLoweringX8632.def"
#include "IceTargetLoweringX8632.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/Support/MathExtras.h"
#include "llvm/Support/CommandLine.h"
-#include <strings.h>
-
namespace Ice {
namespace {
@@ -557,7 +556,7 @@ void TargetX8632::sortByAlignment(VarList &Dest, const VarList &Source) const {
++I) {
Variable *Var = *I;
uint32_t NaturalAlignment = typeWidthInBytesOnStack(Var->getType());
- SizeT LogNaturalAlignment = ffs(NaturalAlignment) - 1;
+ SizeT LogNaturalAlignment = llvm::findFirstSet(NaturalAlignment);
assert(LogNaturalAlignment >= X86_LOG2_OF_MIN_STACK_SLOT_SIZE);
assert(LogNaturalAlignment <= X86_LOG2_OF_MAX_STACK_SLOT_SIZE);
SizeT BucketIndex = LogNaturalAlignment - X86_LOG2_OF_MIN_STACK_SLOT_SIZE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698